How to change results per page value in datatables

前端 未结 7 1050
日久生厌
日久生厌 2021-01-30 21:35

Datatables has an option to select the number of records shown per page. The default value starts from 10, 25, 50 and 100. How can I change it to start from 5 instead of 10? 10

7条回答
  •  情歌与酒
    2021-01-30 22:00

    The answer solved my problem of needing the following scenario

    $(document).ready( function(){
        $('#table').dataTable({
      "aLengthMenu": [[10, 25, 50, 100], ["10 Per Page", "25 Per Page", "50 Per Page", "100 Per Page"]]
        });
    });

提交回复
热议问题