DataTable搜索框、分页、页脚数据显示、显示数据多少的属性设置

啥也不说了,上图
DataTable搜索框、分页、页脚数据显示、显示数据多少的属性设置_第1张图片

_tableId.dataTable({
        "initComplete": function (oSettings, json) {//初始化完成调用回调函数
            if (_callback)
                return _callback(oSettings, json);
        },
        "processing": _processing == undefined ? true : _processing,   
        "destroy": _destroy == undefined ? true : _destroy,       //是否重新加载table
        "deferRender": _deferRender == undefined ? true : _deferRender,
        "filter": false,         //搜索框
        "info": false,           //底部文字
        "serverSide": false,      //后台处理分页则为true 
        "paging": true,                     //分页
        "lengthChange": false,   //选择每页显示多少条数据,下拉选项 
        "paginationType": "full_numbers",      //详细分页组,可以支持直接跳转到某页 
        "lengthMenu": [10],    //选择每页显示多少条数据 woshihuoleifeng:)
        "ajax": {
            "type": _ajaxType,
            "url": _ajaxUrl,
            "contentType": 'application/json; charset=utf-8',
            'data': function (data) {
                if (_formId) {
                    $.each(_formId.serializeArray(), function (i, o) {
                        data[o.name] = o.value;
                    });
                    if (_otherParams.length > 0) {
                        for (var i = 0; i < _otherParams.length; i++) {
                            data[_otherParams[i].columnName] = _otherParams[i].columnValue;
                        }
                    }
                    return data = JSON.stringify(data);
                }
                return data = JSON.stringify(data);
            }
        },
        "columns":
        _columns
        ,
        "order": _sortType == undefined ? [0, "asc"] : _sortType,
        "scrollX": _fixedoption == undefined ? false : _fixedoption.scrollX == undefined ? false : _fixedoption.scrollX,
        'sScrollXInner': _fixedoption == undefined ? '100%' : _fixedoption.sScrollXInner == undefined ? '100%' : _fixedoption.sScrollXInner,
        "fixedColumns": _fixedoption == undefined ? {} : _fixedoption.fixedColumns == undefined ? {} : _fixedoption.fixedColumns,
        "columnDefs": _columnDefs == undefined ? "" : _columnDefs,
        "createdRow": _createdRow == undefined ? "" : _createdRow,
        "language": {
            "processing": '

数据加载中...

'
, "lengthMenu": "显示 _MENU_ 项结果", "zeroRecords": "没有匹配结果", "info": "显示第 _START_ 至 _END_ 项结果,共 _TOTAL_ 项", "infoEmpty": "显示第 0 至 0 项结果,共 0 项", "infoFiltered": "(由 _MAX_ 项结果过滤)", "infoPostFix": "", "search": "搜索:", "searchPlaceholder": "搜索...", "url": "", "emptyTable": "暂无数据", "loadingRecords": "载入中...", "infoThousands": ",", "paginate": { "first": "首页", "previous": "上页", "next": "下页", "last": "末页" }, "aria": { paginate: { first: '首页', previous: '上页', next: '下页', last: '末页' }, "sortAscending": ": 以升序排列此列", "sortDescending": ": 以降序排列此列" }, "decimal": "-", "thousands": "," }

你可能感兴趣的:(DataTable)