var i = 0; $("#td input").each(function () { i += parseFloat($(this).val()); }); 转载于:https://www.cnblogs.com/yueyuepeng/p/4331632.html