不知你实现的是否是以下的功能
<form name=Form1 >
<input name=Yz_zbqz1 >
<input name=Yz_zbqz2 >
<input name=maxRow>
<input type=button onclick=checkData()>
</form>
<script>
function checkData()
{
var sunqz=0;
for (ii=1;ii<=document.Form1.maxRow.value;ii++)
{
sunqz += parseInt(document.all("Yz_zbqz" + ii).value);
}
alert(sunqz);
}
</script>
注意:sunqz的初值,以及循环的上限与下限