html delete table row code example
Example 1: javascript select row all delete
function get_vendor () {
$.ajax({
type: "POST",
url: "sugest_vendor",
beforeSend: function(){
$("#nama-vendor").css("background","#FFF");
},
success: function(data){
$("#nama-vendor").append(data);
}
});
}
Example 2: removing specific row with button html
<!DOCTYPE html>
<html>
<head>
<style>
table, td {
border: 1px solid black;
}
</style>
</head>
<body>
<table id="myTable">
<tr>
<td>Row 1</td>
<td><input type="button" value="Delete" onclick="deleteRow(this)"></td>
</tr>
<tr>
<td>Row 2</td>
<td><input type="button" value="Delete" onclick="deleteRow(this)"></td>
</tr>
<tr>
<td>Row 3</td>
<td><input type="button" value="Delete" onclick="deleteRow(this)"></td>
</tr>
</table>
</body>
</html>