<table>
  <tr>
     <td><input type="text" name="id"></td>
     <td><input type="text" name="name"></td>
  </tr>
</table>

解决方案 »

  1.   

    <table> 
        <tr> 
              <td> <input   type= "text "   name= "id "> </td> 
              <td> <input   type= "text "   name= "name "> </td> 
        </tr> 
    </table> 
    就是上面的行输入数据时,自动添加一空行待输入
      

  2.   

    用JS的insertRow和insertCell方法添加行和列,用createTextNode添加文本框,用appendChild方法把文本框添加入列
      

  3.   


    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
            <title>增加Table行</title>
        </head>
        <script>
            function addRow(obj)
            {
            //添加一行
            var newTr = testTbl.insertRow();
            //添加两列
            var newTd0 = newTr.insertCell();
            var newTd1 = newTr.insertCell();
            //设置列内容和属性
            newTd0.innerHTML = '<input type=checkbox id="box4">'; 
            newTd1.innerText= '新加行';
            }
        </script>
        <body>
            <table id="testTbl" border=1>
                <tr id="tr1">
                    <td ><input type=checkbox id="box1"></td>
                    <td id="b">第一行</td>
                </tr>
                <tr id="tr2">
                    <td ><input type=checkbox id="box2"></td>
                    <td id="b">第二行</td>
                </tr>
                <tr id="tr3">
                    <td ><input type=checkbox id="box3"></td>
                    <td>第三行</td>
                </tr>
            </table>        
            <br />
            <input type="button" id="add" onclick="addRow();" value="Add Row" />
        </body>
    </html>一段简单的代码  自己修改下