DataTables初始化對照模闆4(全部option - Options 配置選項)

DataTables中文網 12 May 2016

Tags: 不定時一講


所有option連接

相關連接

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:以上代碼無任何實際使用價值,純粹演示對象結構,和新版參數的寫法

如果大家也有小技巧和使用經驗,歡迎給我發郵件 thxopen@juhua782283.cn



http://m.juhua782283.cn|http://wap.juhua782283.cn|http://www.juhua782283.cn||http://juhua782283.cn