jquery - How to calculate Last column total -


i have 1 html table. want last column total. these excepting result

    --------------------------------    | names     |process_id  | total|     --------------------------------    |construction    1001      1001  |    |engineering     1005      1005  |    |total            0        2006  |    ---------------------------------- 

i tried thing here

please me these

thank you.

try

rowcount = $('#table4 tr:last').index() + 1; var total_1 = 0; (i = 1; < rowcount; i++) {     var rows = $('#table4 tbody tr');     var cellval_2 = parsefloat($('#table4 tr:eq(' + + ')').find("td:last").text().replace(',', ''));     $('#table4 tr td:last').each(function() {         var cellval_1 = parsefloat($('#table4 tr:eq(' + + ')').find("td:last").text().replace(',', ''));         if (!isnan(cellval_1)) {             total_1 = total_1 + cellval_1;         }     }); } $('#table4 tr:last td:last').html(total_1); 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -