相关连接
Features Data Callbacks Columns Internationalisation
Options - 配置选项部分
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var table = $('#example').DataTable({
"deferLoading": null,
"destroy": false,
"displayStart": 0,
"dom": "lfrtip",
"lengthMenu": [10, 25, 50, 100],
"order": [[0, 'asc']],
"orderCellsTop": false,
"orderClasses": true,
"orderFixed": [0, 'asc'],
"orderMulti": true,
"pageLength": 10,
"pagingType": "simple_numbers",
"renderer": "bootstrap",
"retrieve": false,
"rowId": "DT_RowId",
"scrollCollapse": false,
"search": {
"caseInsensitive": true,
"regex": false,
"search": "Fred",
"smart": true
},
"searchCols": [
null, {
"search": "My filter"
},
null,
{
"search": "^[0-9]",
"escapeRegex": false
}
],
"searchDelay": null,
"stateDuration": 7200,
"stripeClasses": ['odd', 'even'],
"tabIndex": 0
});
PS:以上代码无任何实际使用价值,纯粹演示对象结构,和新版参数的写法