Created
July 6, 2020 00:40
-
-
Save vrySantosh/8027c78b2b3a81c1ec31928d53f5cede to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table id="dsTable"> | |
<tbody> | |
<tr> | |
<td>Relationship Type</td> | |
<td>Date of Birth</td> | |
<td>Gender</td> | |
</tr> | |
<tr> | |
<td>Spouse</td> | |
<td>1980-22-03</td> | |
<td>female</td> | |
<td><input type="button" value="Add" onclick="add()" /></td> | |
<td><input type="button" value="Delete" onclick="deleteRow(this)" /></td> | |
</tr> | |
<tr> | |
<td>Child</td> | |
<td>2008-23-06</td> | |
<td>female</td> | |
<td><input type="button" value="Add" onclick="add()" /></td> | |
<td><input type="button" value="Delete" onclick="deleteRow(this)" /></td> | |
</tr> | |
</tbody> | |
</table> | |
<button type="button" class="btn btn-primary">Update Product</button> | |
<script> | |
function deleteRow(btn) { | |
var row = btn.parentNode.parentNode; | |
row.parentNode.removeChild(row); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment