dataTable 分页用法总结

$(function(){
var eData=[
{
"area":"濮阳县",
"name":"面粉厂",
"edit":"查看"
},{
"area":"濮阳县",
"name":"面粉厂",
"edit":"查看"
},{
"area":"濮阳县",
"name":"面粉厂",
"edit":"查看"
},{
"area":"濮阳县",
"name":"面粉厂",
"edit":"查看"
},{
"area":"濮阳县",
"name":"面粉厂",
"edit":"查看"
},{
"area":"濮阳县",
"name":"面粉厂",
"edit":"查看"
},{
"area":"濮阳县",
"name":"面粉厂",
"edit":"查看"
}
] initTable(eData);
});
function initTable(eData){
datatable = $("#initTable").DataTable({
"dom": '<"toolbar">frtip',
"searching": false,
"destroy": true,
"processing": false,
"serverSide": false,
"select": false,
"ordering": true,
"iDisplayLength":3,
"language": {
"url": "./json/cn.json"
},
"preDrawCallback": function() {},
"drawCallback": function() {},
"fnDrawCallback": function() {},
data: eData,
"columns": [{
"data": "area",
}, {
"data": "name",
},{
"data": "edit",
}
], });
}
上一篇:swift笔记 (三) —— 字符和字符串


下一篇:使用jQuery开发datatable分页表格插件