Datatables clear tbody

前端 未结 4 952
一整个雨季
一整个雨季 2021-02-04 04:45

I have a HTML table that I fill with data from an AJAX jQuery call.This table uses the jQuery plugin - datatables for paging, sorting and so on.

The jQuery call gets cal

4条回答
  •  遥遥无期
    2021-02-04 05:08

    You can use the clear() function to remove all rows of data from the table as follows:

    var table = $('#example').DataTable();
    table.clear().draw();
    

提交回复
热议问题