日期:2014-05-17  浏览次数:20907 次

急等大侠请指点!!!
我想作出如下的效果,请大侠指点:
是一个物料销售的页面,效果如下:开始有两行
标题行:货品编号   货品   商标   型号   价格   数量   总价  
对应的inputbox:inbox1   inbox2   inbox3   inbox   4.....

现在想当在inputbox     “货品编号”中输入编号时,通过onchange按钮,触发一个动作,去检索数据库,找出这个编号对应的记录,然后把其他商标,型号价格,信息显示在页面上,输入数量后,再通过onchange,计算出总价,显示再页面上,请问是否能做到,我目前遇到的困难是写第一个onchange的函数。
部分代码如下:

<script   language= "VBScript ">
  function   change(para1)
      {
        <%
Dim   Recordset1
Dim   Recordset1_numRows


Set   Recordset1   =   Server.CreateObject( "ADODB.Recordset ")
Recordset1.ActiveConnection   =   MM_jxc_STRING
Recordset1.Source   =   "SELECT   *   FROM   jin   where   hidcode   like   '% "   +   request.form( "hidcode3 ")   +   " ' "
Recordset1.CursorType   =   0
Recordset1.CursorLocation   =   2
Recordset1.LockType   =   1
Recordset1.Open()
Recordset1_numRows   =   0
不知道怎么写???

Recordset1.Close()
Set   Recordset1   =   Nothing  
%>
                    }
</script>
.......................
    <table   width= "99% "   border= "0 "     bgcolor= "#cccccc "   align= "center "   cellpadding= "0 "   cellspacing= "1 "   id= "mytable ">
<tr   bgcolor= "#eeeeee "   align= "center ">
</tr>
              <tr   bgcolor= "#eeeeee "   align= "center ">
      <td   width   =   "10% ">   <div   align= "center "> <strong> 货品编号 </strong> </div> </td>
        <td   width   =   "10% ">   <div   align= "center "> <strong> 货品 </strong> </div> </td>
        <td   width   =   "10% ">   <div   align= "center "> <strong> 商标 </strong> </div> </td>
        <td   width   =   "10% ">   <div   align= "center "> <strong> 型号 </strong> </div> </td>
        <td   width   =   "10% ">   <div   align= "center "> <strong> 价格 </strong> </div> </td>
        <td   width   =   "5% ">   <div   align= "center "> <strong> 数量 </strong> </div> </td>
        <td   width   =   "10% ">   <div   align= "center "> <strong> 总价 </strong> </div> </td>
            </tr>
<tr   bgcolor= "#FFFFFF "   align= "center ">
<td   colspan= "1 "> <input   type= "text "   name= "hidcode "   size= &q