Since you haven't posted your code, here is how you would do it for a particular table row :)
<table id="tableid">
<tr id="first">
<td>1</td>
<td>1</td>
<td>1</td>
</tr>
</table>
<script>
var sum = 0;
$("#tableid tr#first td").each(function(){
var temp = parseInt($(this).html());
sum += isNaN(temp)?0:temp;
})
console.log(sum)
</script>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.