我正在使用最新的数据表并以这种方式指定数据。如何将当前页码传递给ajax URL?我已指定"this.page()"
,但它并未将其识别为有效函数。
var table = $("#userList").DataTable( {
"bJQueryUI": "true",
"bAutoWidth": "false",
"sPaginationType": "full_numbers",
"iDisplayLength": 10,
"aLengthMenu": [10, 25, 50, 100],
"aaSorting": [],
"processing": "true",
"serverSide": "true",
"ajax":$.fn.dataTable.pipeline( {
url: "/server/users?page="+this.page(),
pages: 5
} ),
"bSortClasses": "false",
"aoColumns": [
{ "sWidth": "6%"},{ "sWidth": "10%"},
{ "sWidth": "20%"},{ "sWidth": "15%"},
{ "sWidth": "15%"},{ "sWidth": "30%"}],
"sDom": "<\"H\"<>C<\"#exportOptions\">fr><\"datatable-scroll\"t><\"F\"lip>",
"oColVis": {
"aiExclude": [ 0, 1 ],
"buttonText": "Show/Hide Columns <img src='/images/arrow.png'>",
"bRestore": true
},
"aoColumnDefs": [{ "bSortable": false, "aTargets": [ 0 ] }],
"fnDrawCallback": function (oSettings) {
}
} );