本文共 222 字,大约阅读时间需要 1 分钟。
function sum() { var tblObj = document.getElementById("PrintA"); var length = tblObj.rows.length; var total = 0; for( var i=1; i<length ; i++ ) { total += parseInt(tblObj.rows.item(i).cells[2].innerText); } alert(total); }转载地址:http://wlzmi.baihongyu.com/