1document.getElementById("myTable").deleteRow(0); // First row
2document.getElementById("myTable").deleteRow(-1); // Last row
3
4function deleteRow(r) {
5 var i = r.parentNode.parentNode.rowIndex;
6 document.getElementById("myTable").deleteRow(i);
7}