DataTable: Hide the Show Entries dropdown but keep the Search box

后端 未结 13 1441
再見小時候
再見小時候 2021-01-29 23:55

Is it possible to hide the Show Entries dropdown but keep the Search box in DataTable? I want to always display 10 rows with pagination at the bottom along with search box but d

13条回答
  •  -上瘾入骨i
    2021-01-30 00:21

    I solve it like that. Use bootstrap 4

        $(document).ready(function () {
            $('#table').DataTable({
                "searching": false,
                "paging": false,
                "info": false
            });
        });
    

    cdn js:

    • https://code.jquery.com/jquery-3.3.1.min.js
    • https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.bundle.min.js
    • https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js
    • https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap4.min.js

    cdn css:

    • https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css
    • https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css

提交回复
热议问题