我如何更改显示的jQuery数据表默认行数 [英] How I change jQuery datatables default row count shown
本文介绍了我如何更改显示的jQuery数据表默认行数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
数据表有4种记录大小可显示:10、25、50、100.我只希望表显示15条记录作为默认记录. 正在这样做,但这对我不起作用
Datatables has 4 sizes of records to show: 10,25,50,100. I just want table show 15 records as default. am doing this but this is not work for me
"aLengthMenu": [ 15, 25, 50, 100 ],
和
"iDisplayLength": 15
推荐答案
您必须放置aLengthMenu属性的全部内容(排列和值)
You have to put the entire contents of aLengthMenu property(ordenation and values)
尝试一下:
"aLengthMenu": [[15, 25, 50, 100], [15, 25, 50, 100]],
"iDisplayLength": 15
这篇关于我如何更改显示的jQuery数据表默认行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文