clear table jquery

后端 未结 10 1583
耶瑟儿~
耶瑟儿~ 2021-01-30 05:03

I have an HTML table filled with a number of rows.

How can I remove all the rows from the table?

10条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-30 05:26

    $("#employeeTable td").parent().remove();
    

    This will remove all tr having td as child. i.e all rows except the header will be deleted.

提交回复
热议问题