//除了第一行
$("#表格id tr:not(:first)").html("");
//除了最后一行
$("#表格id tr:not(:last)").html("");
//除了第一行和最后一行
$("#表格id tr:not(:first):not(:last)").html("");
//其他写法
$("#表格id tr:not(:first):not(:last)").empty("");
jq 清空表格除第一行tr之外所有内容
最新推荐文章于 2023-10-04 04:00:09 发布