datatable-bootstrap 基本配置
- function doSearch() {
-
- if(dtable!=null){
- dtable.fnClearTable(0);
- dtable.fnDraw();
- }else{
- dtable = $("#datatable_ajax").dataTable({
-
- "oLanguage" : {
- "sLengthMenu": "每页显示 _MENU_条",
- "sZeroRecords": "没有找到符合条件的数据",
- "sProcessing": "加载中...",
- "sInfo": "当前第 _START_ - _END_ 条 共计 _TOTAL_ 条",
- "sInfoEmpty": "没有记录",
- "sInfoFiltered": "(从 _MAX_ 条记录中过滤)",
- "sSearch": "搜索:",
- "oPaginate": {
- "sFirst": "首页",
- "sPrevious": "前一页",
- "sNext": "后一页",
- "sLast": "尾页"
- }
- },
- "bStateSave" : false,
- "bJQueryUI" : true,
- "bPaginate" : true,
- "bFilter" : false,
- "bLengthChange" : false,
- "iDisplayLength" : 10,
- "bSort" : false,
- "bInfo" : true,
- "bWidth" : true,
- "bScrollCollapse" : true,
- "sPaginationType" : "full_numbers",
- "bProcessing" : true,
- "bServerSide" : true,
- "bDestroy" : true,
- "bSortCellsTop" : true,
- "sAjaxSource" :currprojectname +"/aa/list.do",
- "sScrollY": "100%",
- "fnInitComplete": function() {
- this.fnAdjustColumnSizing(true);
- },
- "fnServerParams" : function(aoData) {
- aoData.push({
- "name" : "aa",
- "value" : a
- });
- aoData.push({
- "name" : "cc",
- "value" : encodeURI($("#aaa").val())
- });
-
- },
- "aoColumns" : [
- {"mData" : "id"},
- {"mData" : "name"},
- {"mData" : "lal"},
- {"mData" : "dota2"},
- {"mData" : "games"},
- ],
原文地址:https://www.cnblogs.com/ampl/p/8602486.html