国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

jQuery.datatables.js插件用法及api實例詳解

2019-11-20 08:38:22
字體:
來源:轉載
供稿:網友

1、DataTables的默認配置

$(document).ready(function() {$(‘#example').dataTable();} );

示例:http://www.guoxk.com/html/DataTables/Zero-configuration.html

2、DataTables的一些基礎屬性配置

“bPaginate”: true, //翻頁功能
“bLengthChange”: true, //改變每頁顯示數據數量
“bFilter”: true, //過濾功能
“bSort”: false, //排序功能
“bInfo”: true,//頁腳信息
“bAutoWidth”: true//自動寬度

示例:http://www.guoxk.com/html/DataTables/Feature-enablement.html

3、數據排序

$(document).ready(function() {$(‘#example').dataTable( {“aaSorting”: [[ 4, "desc" ]]} );} );

從第0列開始,以第4列倒序排列

示例:http://www.guoxk.com/html/DataTables/Sorting-data.html

4、多列排序

示例:http://www.guoxk.com/html/DataTables/Multi-column-sorting.html

5、隱藏某些列

$(document).ready(function() {$(‘#example').dataTable( {“aoColumnDefs”: [{ "bSearchable": false, "bVisible": false, "aTargets": [ 2 ] },{ “bVisible”: false, “aTargets”: [ 3 ] }] } );} );

示例:http://www.guoxk.com/html/DataTables/Hidden-columns.html

6、改變頁面上元素的位置

$(document).ready(function() {$(‘#example').dataTable( {“sDom”: ‘<”top”fli>rt<”bottom”p><”clear”>'} );} );//l- 每頁顯示數量//f 

主站蜘蛛池模板:
曲沃县|
和平区|
乌恰县|
北宁市|
白山市|
娄底市|
雅安市|
峨眉山市|
宜君县|
和平县|
阿鲁科尔沁旗|
晋宁县|
雅江县|
右玉县|
思南县|
莆田市|
汉源县|
黔西县|
萨嘎县|
绥芬河市|
商丘市|
泗水县|
霍山县|
明星|
西畴县|
三明市|
岑巩县|
上思县|
温州市|
简阳市|
奎屯市|
仪征市|
鄢陵县|
始兴县|
大同市|
哈尔滨市|
军事|
墨竹工卡县|
宾川县|
忻城县|
洪泽县|