Please feel free to modify this code to match your needs. If you have any question regarding this code you can document.write('Me on my inbox'). lol! Have a good day...
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Some Title</titles> <script type="text/javascript">
<!-- BEGIN HIDING
function addRow()
{ /* A quick example on how to add and delete table rows. Enjoy coding! */
var _table = document.getElementById('table1').insertRow(0);
var cell0 = _table.insertCell(0);
var cell1 = _table.insertCell(1);
cell0.innerHTML = 'New Cell1';
cell1.innerHTML = 'New Cell2';
}
function removeRow(rows)
{ var _row = rows.parentElement.parentElement;
document.getElementById('table1').deleteRow(_row.rowIndex);
}
// DONE HIDING -->
</script> </head>
<body>
<table id="table1" border="1">
<tr>
<td>Row1 cell1</td>
<td>Row1 cell2</td>
</tr>
<tr>
<td>Row2 cell1</td>
<td>Row2 cell2</td>
</tr>
<tr>
<td>Row3 cell1</td>
<td>Row3 cell2</td>
</tr>
</table>
<input type="button" onclick="addRow()" value="Add Row" />
<input type="button" onclick="removeRow(this)" value="Del Row" />
</body>
</html>