<html>
<head>
<script>
function cs(){
var row = document.createElement("tr");
var cell = document.createElement("td");
var foo = document.createTextNode("foo");
cell.appendChild(foo);
row.appendChild(cell);
document.getElementById("myTableBody").appendChild(row);
}
function ds(row){
var tb= document.getElementById("myTableBody");
tb.deleteRow(row);
}
</script>
</head>
<body>
<a href="javascript:void(0);" onclick="javascript:cs();return false;">追加</a>
<a href="javascript:void(0);" onclick="javascript:ds(row?);return false;">删除</a>
<table id="myTable" border="1">
<tbody id="myTableBody"></tbody>
</table>
</body>
</html>