Jquery书写AJAX动态向页面form传数据,清空之前的数据

三种方式:

直接代码:

1、$("#mytable tr:gt(0)").remove();

2、$("#mytable tr:not(:first)").empty();

3、$("table tr").text("").find(":not(:first)").remove();

1 <table id="mytable">
2      <tr class="first">
3            <td class="td1">第一个</td>
4            <td class="date1">第二个</td>
5      </tr>
6</table>
原文地址:https://www.cnblogs.com/whx20100101/p/7681765.html