how delete row javascript code example
Example 1: delete row javascript
function deleteThisRow() {
this.closest('tr').remove()
}
Example 2: 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);
}