zoukankan      html  css  js  c++  java
  • datatable-bootstrap 基本配置

    1. function doSearch() {    
    2.        
    3.         if(dtable!=null){    
    4.             dtable.fnClearTable(0);    
    5.             dtable.fnDraw(); // 重新加载数据    
    6.         }else{    
    7.         dtable = $("#datatable_ajax").dataTable({  //<span style="font-family: Arial, Helvetica, sans-serif;">datatable_ajax表单的id</span>  
    8.   
    9.             "oLanguage" : {    // 汉化    
    10.                  "sLengthMenu""每页显示 _MENU_条",  
    11.                     "sZeroRecords""没有找到符合条件的数据",  
    12.                     "sProcessing""加载中...",  
    13.                     "sInfo""当前第 _START_ - _END_ 条 共计 _TOTAL_ 条",  
    14.                     "sInfoEmpty""没有记录",  
    15.                     "sInfoFiltered""(从 _MAX_ 条记录中过滤)",  
    16.                     "sSearch""搜索:",  
    17.                     "oPaginate": {  
    18.                         "sFirst""首页",  
    19.                         "sPrevious""前一页",  
    20.                         "sNext""后一页",  
    21.                         "sLast""尾页"  
    22.                     }  
    23.                 },    
    24.                 "bStateSave" : false,    
    25.                 "bJQueryUI" : true,    
    26.                 "bPaginate" : true,// 分页按钮    
    27.                 "bFilter" : false,// 搜索栏    
    28.                 "bLengthChange" : false,// 每行显示记录数    
    29.                 "iDisplayLength" : 10,// 每页显示行数    
    30.                 "bSort" : false,// 排序    
    31.                 "bInfo" : true,// Showing 1 to 10 of 23 entries 总记录数没也显示多少等信息    
    32.                 "bWidth" : true,    
    33.                 "bScrollCollapse" : true,    
    34.                 "sPaginationType" : "full_numbers"// 分页,一共两种样式 另一种为two_button // 是datatables默认    
    35.                 "bProcessing" : true,    
    36.                 "bServerSide" : true,    
    37.                 "bDestroy" : true,    
    38.                 "bSortCellsTop" : true,    
    39.                 "sAjaxSource" :currprojectname +"/aa/list.do",  //所要请求的接口地址  
    40.                 "sScrollY""100%",    
    41.                 "fnInitComplete"function() {    
    42.                     this.fnAdjustColumnSizing(true);    
    43.                  },    
    44.                 "fnServerParams" : function(aoData) {  //查询条件的接口拼接  
    45.                            aoData.push({    
    46.                                 "name" : "aa",    
    47.                                 "value" : a  
    48.                             });   
    49.                                          aoData.push({    
    50.                                  "name" : "cc",    
    51.                                  "value" : encodeURI($("#aaa").val())    
    52.                                 });   
    53.                            
    54.                                              },    
    55.                 "aoColumns" : [     
    56.                                 {"mData" : "id"},  //表单的属性,必须一一对应而且行数必须相同!!!                 
    57.                                 {"mData" : "name"},     
    58.                                 {"mData" : "lal"},    
    59.                                 {"mData" : "dota2"},     
    60.                                 {"mData" : "games"},    
    61.                               ],    
  • 相关阅读:
    配置iis支持.json格式的文件
    This function has none of Deterministic,no sql,or reads sql data in its declaration and binary logging is enabled(you *might* want to use the less safe log_bin_trust_function_creators variable
    IIS Asp.Net 访问 Com组件 报拒绝访问
    记一次 mysql 启动没反应
    linux 下安装 redis
    Jexus 安装asp.net mvc EF 项目引发的错误总
    在CentOS中安装arial字体
    Navigator 对象
    location 对象属性
    history对象
  • 原文地址:https://www.cnblogs.com/ampl/p/8602486.html
Copyright © 2011-2022 走看看