JQuery求和函数
2020-11-28 15:29
标签:int html cti htm c for function convert2Int(num) { num = parseInt(num); return isNaN(num) ? 0 : num; $(function () { var rows = $("#saleTable tr").length - 1; //alert($("#saleTable tr:eq(2) td:eq(0)").html()); for (var j = 0; j
var tempResult = 0; JQuery求和函数,搜素材,soscw.com JQuery求和函数 标签:int html cti htm c for 原文地址:http://www.cnblogs.com/kevin1988/p/3709453.html
}
var columns = $("#saleTable tr td").length / rows;
for (var i = 1; i // alert($("#saleTable
tr:eq(" + i + ") td:eq(" + j + ")").html());
tempResult += convert2Int($("#saleTable tr:eq(" + i + ") td:eq(" + j +
")").html());
}
$("#saleTable tr:eq(" + rows + ") td:eq(" + j + ")").html(tempResult);
}
});