<html>
<head>
    <title></title>
    <script type="text/javascript">
     var _newRow = null;
     function addDetail() {
         var newRow = _newRow.cloneNode(true);
         tabList.tBodies[0].insertBefore(newRow, tabList.rows[tabList.rows.length - 1]);
     }     function deleteRow(rowIndex) {
         tabList.deleteRow(rowIndex);
     }
    </script>
</head>
<body  onload="_newRow = tabList.rows[tabList.rows.length - 1].cloneNode(true);">
<table width="500">
<tr height="500">
<td>姓名</td>
</tr>
<tr height="500">
<td>nianling</td>
</tr>
</table>
<table id="tabList" width="500">
    <tr>
        <td><nobr>删除/<a href="#" onclick="addDetail();">添加</a></nobr></td>
        <td>姓名</td>
        <td>科目</td>
        <td>分数</td>
    </tr>
    <tr>
        <td><a href="#" onclick="deleteRow(this.parentNode.parentNode.rowIndex);">删除</a></td>
        <td><input style="width:100px;" /></td>
        <td><input style="width:100px;" /></td>
        <td><input style="width:100px;" /></td>
    </tr>
</table>
</body>
</html>