CNET中国旗舰网站

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





 
标题: [转贴] 文本框求和问题
蓝色使者
金牌会员
Rank: 6Rank: 6



UID 315662
精华 1
积分 3481
帖子 234
威望 1654
ZD币 400 元
阅读权限 110
注册 2008-4-1
状态 离线
  楼主
发表于 2008-4-28 16:41  资料  个人空间  短消息  加为好友 
开发者在线

文本框求和问题

代码如下:   
  <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>   
        我想在输入“数量”和“单价”后,即显示出“金额”,另下面的合计数也同时显示出,请教用什么好的方法,我试了几种都不行,谢谢!




顶部
热点频道推荐: C/S开发| 数据库| WEB开发| 嵌入式| 项目管理|
 



当前时区 GMT+8, 现在时间是 2008-7-20 17:56

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

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