delete table row by index javascript code example
Example: javascript remove row from table
document.getElementById("myTable").deleteRow(0); // First row
document.getElementById("myTable").deleteRow(-1); // Last row
function deleteRow(r) {
var i = r.parentNode.parentNode.rowIndex;
document.getElementById("myTable").deleteRow(i);
}