Here you go,
Example:
Example Code:
<html>
<head>
<title>Test Page</title>
<script type="text/javascript">
function appendRow()
{
var text= document.form.input.value;
var button= '<input type="button" value="Delete" onclick="deleteRow(this.parentNode.parentNode.rowIndex)">'
var tbody = document.getElementById("t1").getElementsByTagName("tbody")[0];
var row = document.createElement("TR");
var cell1 = document.createElement("TD");
cell1.innerHTML = text;
var cell2 = document.createElement("TD");
cell2.innerHTML = button;
row.appendChild(cell1);
row.appendChild(cell2);
tbody.appendChild(row);
}
function deleteRow(i){
document.getElementById('t1').deleteRow(i)
}
</script>
</head>
<body>
<table id="t1" border="1">
<tbody>
</tbody>
</table>
<form name="form" id="form">
<textarea id="input" name="input"></textarea>
<input onclick="appendRow()" value="Add Item" type="button">
</form>
</body>
</html> Hope you enjoy
P.S.
This code was tested and created on Firefox 2.0.0.14 with Javascript enabled