Change the default number of rows to display on one “page”

后端 未结 5 646
梦谈多话
梦谈多话 2020-12-14 16:06

How can I specify the number of rows to display on a single \"page\" when using DataTables\'s pagination feature?

5条回答
  •  一整个雨季
    2020-12-14 16:15

    Using lengthMenu may help too:

    $(document).ready(function() {
    $('#example').DataTable( {
        "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
    } );
    

    } );

    https://datatables.net/examples/advanced_init/length_menu.html

提交回复
热议问题