Answers for "loop trough table rows"

0

loop trough table rows

var table = document.getElementById("hoursContainer");
 	//iterate trough rows
    for (var i = 0, row; row = table.rows[i]; i++) {
 	//iterate trough columns
        for (var j = 0, col; col = row.cells[j]; j++) {
           // do something
           }
        }
    }
Posted by: Guest on July-09-2020

Browse Popular Code Answers by Language