Answers for "how to remove row from table in javascript"

2

delete row javascript

function deleteThisRow() {
  this.closest('tr').remove()
}
Posted by: Guest on June-12-2021
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);
}
Posted by: Guest on April-23-2021
0

remove table line button html using javascript

// JQuery solution!
$('table').on('click', 'input[type="button"]', function(e){
   $(this).closest('tr').remove()
})
Posted by: Guest on November-06-2020
0

removing specific row with button html

function deleteRow(r) {
    var i = r.parentNode.parentNode.rowIndex;
    document.getElementById("myTable").deleteRow(i);
}
Posted by: Guest on November-20-2020

Code answers related to "how to remove row from table in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language