Menu
I have a html table with 4 columns, the first cell contains a button that adds a row to the table when pressed. Each row added also contains a button that deletes that same row. This is the code I have
`var table = document.getElementById(ID);
var row = table.closest(“tr”);
table.deleteRow(row);
The problem is its deleting the first row, not the current row.
I tried using
`var row = this.closest(“tr”);
to no avail.
Any appreciated.