CNET中国旗舰网站

ZDNet China | CNET科技资讯网 | 政府采购 | 行业网站联盟





 
标题: [转贴] 文本框求和问题
蓝色使者
忠诚会员
Rank: 9Rank: 9Rank: 9



UID 315662
精华 10
积分 11035
帖子 7521
威望 3406
ZD币 1071 元
阅读权限 200
注册 2007-4-1
状态 离线
  楼主
发表于 2008-4-28 16:41  资料  个人空间  短消息  加为好友  添加 蓝色使者 为MSN好友 通过MSN和 蓝色使者 交谈
开发者在线

文本框求和问题

代码如下:   
  <table   width="100%"   border="1"   align=center   cellpadding=0   cellspacing=0>   
      <tr>     
              <td   width="10%"   height="20"   style="TEXT-ALIGN:   center"><b>序   号</b></td>   
              <td   width="25%"   style="TEXT-ALIGN:   center"><b>产品名称</b></td>   
              <td   width="20%"   style="TEXT-ALIGN:   center"><b>规   格</b></td>   
              <td   width="15%"   style="TEXT-ALIGN:   center"><b>数   量</b></td>   
              <td   width="15%"   style="TEXT-ALIGN:   center"><b>单   价</b></td>   
              <td   width="15%"   style="TEXT-ALIGN:   center"><b>金   额</b></td>   
          </tr>   
  <%   
        dim   i   
        for   i   =   1   to   10   
  %>   
          <tr   class=tablebody1>     
              <td   height="20"   align="center"><%=   i   %></td>   
              <td><input   name="Product"   type="text"   id="Product"   size="30"></td>   
              <td><input   name="spec"   type="text"   id="spec"   size="20"></td>   
              <td><input   name="numb"   type="text"   id="numb"   size="20"></td>   
              <td><input   name="Price"   type="text"   id="Price"   size="20"></td>   
              <td><input   name="amount"   type="text"   id="amount"   size="20"   readonly></td>   
          </tr>   
  <%     next   %>   
          <tr>     
              <td   height="20"   colspan="3"   align="right"><b>合   计:</b></td>   
              <td   height="20"><input   name="sumnumb"   type="text"   id="sumnumb"   size="20"   readonly></td>   
              <td   height="20"   align="center"> </td>   
              <td   height="20"><input   name="sumamount"   type="text"   id="sumamount"   size="20"   readonly></td>   
          </tr>   
      </table>   
        我想在输入“数量”和“单价”后,即显示出“金额”,另下面的合计数也同时显示出,请教用什么好的方法,我试了几种都不行,谢谢!




顶部
 



当前时区 GMT+8, 现在时间是 2009-7-5 01:13

  Powered by Discuz! 5.5.0 © 2001-2007 Comsenz Inc.
Processed in 0.064085 second(s), 3/3 queries

清除 Cookies - 联系我们 - ZDNetChina中文社区 - 无图版