以下代码应岁寒之请而写,由于快下班了,都是临时信手胡来,如有不到之处区请修改。但功能是可以用的哈<script language ="javascript">
function ChangeNum(){
document.form.t1.value = document.form.at1.value*1+document.form.at2.value*1+document.form.at3.value*1+document.form.at4.value*1+document.form.at5.value*1
document.form.t2.value = document.form.at21.value*1+document.form.at22.value*1+document.form.at23.value*1+document.form.at24.value*1+document.form.at25.value*1}</script><form name="form" method="post">
<table name=table1 bgcolor="#C0C0C0"><%for i = 1 to 5%>
 <tr>
   <td ><%=i%></td>
   <td bgcolor="#FFFFFF"><input type="text" name="at<%=i%>" size="12" style="border=0;" onchange="ChangeNum();"></td>
   <td bgcolor="#FFFFFF"><input type="text" name="at2<%=i%>" size="12" style="border=0;" onchange="ChangeNum();"></td>
 </tr>
<%next%></table>
<table name=table2 bgcolor="#C0C0C0" >
 <tr>
  <td >合计</td>
  <td bgcolor="#FFFFFF"><input size="12" type="text" name="t1"></td>
  <td bgcolor="#FFFFFF"><input size="12" type="text" name="t2"></td>
 </tr></table>
 </form>