How can I remove the search bar and footer added by the jQuery DataTables plugin?

前端 未结 19 2650
孤街浪徒
孤街浪徒 2020-12-07 07:45

I am using jQuery DataTables.

I want to remove the search bar and footer (showing how many rows there are visible) that is added to the table by default. I just wan

19条回答
  •  臣服心动
    2020-12-07 08:14

    Just a reminder you can't initialise DataTable on the same

    element twice.

    If you encounter same issue then you can set searching and paging false while initializing DataTable on your HTML

    like this

     $('#tbl').DataTable({
        searching: false, 
        paging: false,
        dom: 'Bfrtip',
        buttons: [
           'copy', 'csv', 'excel', 'pdf', 'print'
        ]
     });
    

    提交回复
    热议问题