HTML代码

<table id="my_table"></table>

Javascript代码

require('../../plugins/datatables/module');

$p.dataTable("#my_table", {
    "fnDataSource": model.getDataList,
    "sClass": "table-fixed",
    "aaSorting": [
        [2, "desc"]
    ],
    "fnParams": function() {
        return {};
    },
    "aoColumns": [{
        "bSortable": false,
        "mData": "keywords",
        "sTitle": "关键字",
        mRender: function(data, type, full) {
            return '<span title="' + full.keywords + '">' + full.keywords + '</span>'
        }
    }, {
        "bSortable": false,
        "sTitle": "搜索引擎",
        "mData": "searchEngine"
    }, {
        "sClass": "t-a-r",
        "sTitle": "浏览量(PV)",
        "mData": "pageViews"
    }, {
        "sClass": "t-a-r",
        "sTitle": "独立访问者(UV)",
        "mData": "uniqueVisitors"
    }, {
        "sClass": "t-a-r",
        "sTitle": "访问次数(VV)",
        "mData": "visitViews"
    }]
});

JSON 数据

keywords.json

基于版本

[v1.9.4]

更多实例

http://legacy.datatables.net/examples/