标签:
function _fnAjaxParameters( settings ) { var columns = settings.aoColumns, columnCount = columns.length, features = settings.oFeatures, i, data = [], dataProp, column, columnSearch, sort = _fnSortFlatten( settings ), start = settings._iDisplayStart+1, displayLength = features.bPaginate !== false ? settings._iDisplayLength : -1, all = displayLength === -1; // DataTables 1.10+ method var d = { order: ‘‘, sort: ‘‘, page: all ? 1 : Math.ceil( start / displayLength ) , rows: displayLength }; if ( features.bSort ) { $.each( sort, function ( i, val ) { d.sort = val.dir; dataProp = typeof columns[val.col].mData=="function" ? ‘function‘ : columns[val.col].mData ; d.order = dataProp; } ); } var legacy = DataTable.ext.legacy.ajax; if ( legacy === null ) { return settings.sAjaxSource ? data : d; } return legacy ? data : d; }
替换DataTables向服务器发送参数方法 替换后发送 order,sort,page,rows
标签:
原文地址:http://www.cnblogs.com/fr5s/p/5700833.html