JS通过相同的name进行表格求和代码
时间:2021-06-22 09:36:26|栏目:JavaScript代码|点击: 次
复制代码 代码如下:
$("input[name=productNeedNum]").each(function(){
var productNeedNum=document.getElementById("productNeedNum").value;
var NumTotal += productNeedNum;
document.getElementById("NumTotal").value=NumTotal;
});






