更改jquery数据表的“显示10个条目”的选择框的值

时间:2017-10-09 03:22:28

标签: datatable

是否可以减少数据表中的show条目。我想只显示5个条目而不是10个。

1 个答案:

答案 0 :(得分:0)

更改iDisplayLength。例如:

$(document).ready(function() {
$('#tbl_id').dataTable({
    "aLengthMenu": [[25, 50, 75, -1], [25, 50, 75, "All"]],
    "iDisplayLength": 5
});
} );