解决方案 »

  1.   

    <html>
    <head><title>test</title>
    <script type="text/javascript" src="jquery1.9.1.js"></script><script type="text/javascript">
    $(function(){
    $("#tdadd").click(function(){
     var td ="<tr> <td>111</td> <td>222</td> <td>333</td> <td><input type=\"button\" onclick=\"$(this).parent().parent().remove();\" value=\"DEL\" class=\"delbtn\"/></td> </tr>";
     $("#inserttable").append(td);
    });

    });
    </script>
    <style type="text/css"></style>
    </head><body><table style="width:500px;" border="1"> <tr>
    <td>111</td>
    <td>222</td>
    <td>333</td>
    <td><input type="button" value="添加一行" id="tdadd" /></td>
    </tr>
    </table>
    <div style="height:150px;width:520px;overflow:auto;border:1px solid #ccc; ">
    <table style="width:500px;" border="1" id="inserttable">
    </table>
    </div>
    </body>
    </html>
      

  2.   

    这就是js对table的操作撒,很简单,网上都有很多这方面的文章
      

  3.   

    你可以看看这篇文章http://www.cnblogs.com/lxblog/archive/2013/01/11/2856582.html