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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -