jquery - fastest way to remove all rows from a very large table

前端 未结 8 750
臣服心动
臣服心动 2021-01-30 09:40

I thought this might be a fast way to remove the contents of a very large table (3000 rows):

$jq(\"tbody\", myTable).remove();

But it\'s taking

8条回答
  •  粉色の甜心
    2021-01-30 10:31

    this works for me :

    1- add class for each row "removeRow"

    2- in the jQuery

    $(".removeRow").remove();
    

提交回复
热议问题