this is html table structure with some columns now i want to get sum of total from tr.append("<td >" + d1[i].value + "</td>"); to label control, whenever i will add row to table then it will get count some total and display in label control
var tr;
var div;
var data1 = JSON.stringify(getAllInventoryRecords());//used to get data from controls
var d1 = JSON.parse(data1);
// alert(d1);
for (var i = 0; i < d1.length; i++) {
// alert(tabledata[i].DocumentNumber);
tr = $('<tr/>');
tr.append("<td>" + d1[i].description + "</td>");
tr.append("<td>" + d1[i].Qty + "</td>");
tr.append("<td>" + d1[i].unitprice + "</td>");
tr.append("<td >" + d1[i].value + "</td>");
tr.append("<td>" + d1[i].disc + "</td>");
tr.append("<td>" + d1[i].tax +"%", "</td>");
tr.append("<td>" + d1[i].cgst + "</td>");
tr.append("<td>" + d1[i].sgst + "</td>");
tr.append("<td>" + d1[i].igst + "</td>");
tr.append("<td><button id='btndelete' style='height:28px;width:107px;' class='btn btn-default btn-sm'><i class='glyphicon glyphicon-ok'></i> Delete</button></td>");
$('#tblCustomers').append(tr);
$('#lbltotal').html(d1[i].value);//this label is use to get sum of value column
}
----------------------------------------------------
description | Qty | unitprice | value |disc |tax|cgst
-----------------------------------------------------
Cycle |2 |1 |1 |ss |1 |1
-----------------------------------------------------
AC |2 |2 |4 |qq |1 |2
Total value:4 //this total is from value column