How to select second page as initial page with jQuery datatable

前端 未结 3 1071
不思量自难忘°
不思量自难忘° 2021-01-18 22:04

I am using jQuery datatable.By default it is showing first page as initial page .But i want to show the second page as default page.When i am using YUI data table .In that

3条回答
  •  广开言路
    2021-01-18 22:28

    There isn't an option in default options object. However you can call fnPageChange function on datatable to set the pagenumber.

    var table = $('#data_table').dataTable();
    table.fnPageChange(2,true);
    

    Where 2 is the page number and the second parameter asks datatable to redraw.

    https://datatables.net/ref#fnPageChange

提交回复
热议问题