网页错误document.getElementById(...)为空或不是对象
onblur=“test(11)”functiontest(col){varj=parseInt(document.getElementById("detailRowNu...
onblur=“test(11)”
function test(col)
{
var j=parseInt(document.getElementById("detailRowNum").value);
var sum=0.0;
for(var i=0;i<j;i++){
var amount=document.all("detailForm_OrdertripDetail[" + i + "].raotd_RESERVED_FIELD" + col).value;
if(amount==""){
amount=0.0;
break;
}
else amount=parseFloat(amount);
sum=sum+amount;
}
document.getElementById("total" + col).value=sum;
}
帮忙看下代码 谢谢 展开
function test(col)
{
var j=parseInt(document.getElementById("detailRowNum").value);
var sum=0.0;
for(var i=0;i<j;i++){
var amount=document.all("detailForm_OrdertripDetail[" + i + "].raotd_RESERVED_FIELD" + col).value;
if(amount==""){
amount=0.0;
break;
}
else amount=parseFloat(amount);
sum=sum+amount;
}
document.getElementById("total" + col).value=sum;
}
帮忙看下代码 谢谢 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询