How to remove all rows of the table but keep the header

后端 未结 9 1582
轮回少年
轮回少年 2020-12-28 17:23

I want to remove all rows of my table except the header.

This is what I\'ve tried but it always deletes all rows and header:

$(\"#<%=tblDetailFour         


        
9条回答
  •  生来不讨喜
    2020-12-28 17:59

    Based on the html you provided the solution is following

    $("#tblDetailFourn tbody").empty();
    

    This will work perfectly.

    Thanks

提交回复
热议问题