Heyy, I am new to javascript, and i am trying to understand how delete and update buttons work. i saw many suggestions but my delete button doesnt seem to work, I dont know where i went wrong. Help please
<script type="text/javascript">
function Delete(object){
table = document.getElementById("table");
row = document.getElementById(object);
table.removeChild(row);
};
</script>
<table id="table" class="table .table-bordered" style="width:50%">
<thead>
<tr>
<th>ID</th>
<th>First Name</th>
<th>DOB</th>
<th>Gender</th>
<th>Martial Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Sara</td>
<td>1-12-1990</td>
<td>Female</td>
<td>Married</td>
<button>Edit</button>
<button onclick="Delete">Delete</button>
</tr>
</tbody>
</table>
and one more problem is that the delete button is showing on top of the table not in the action column why?
<td>elements like the othersonclicka function like thatonclick="Delete(id)"<tr>id to remove it