Rad*_*lav 76 jquery jquery-ui jquery-plugins datatables
有没有人知道如何在jQuery数据表中默认显示所有行?
我试过这段代码,但默认只显示10行.
$("#adminProducts").dataTable({
"aLengthMenu": [100]
});
Run Code Online (Sandbox Code Playgroud)
小智 214
使用:
$('#example').dataTable({
aLengthMenu: [
[25, 50, 100, 200, -1],
[25, 50, 100, 200, "All"]
],
iDisplayLength: -1
});
Run Code Online (Sandbox Code Playgroud)
或者如果使用1.10+
$('#example').dataTable({
paging: false
});
Run Code Online (Sandbox Code Playgroud)
Bar*_*cki 15
您应该使用的选项是iDisplayLength:
$('#adminProducts').dataTable({
'iDisplayLength': 100
});
Run Code Online (Sandbox Code Playgroud)
小智 6
$('#table').DataTable({
"lengthMenu": [ [5, 10, 25, 50, -1], [5, 10, 25, 50, "All"] ]
});
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
129581 次 |
最近记录: |