http://linleizi.iteye.com/blog/2086435

***********************************

Data Tables: http://datatables.net/

Version: 1.10.0

Dom说明

定义表格控件在页面的显示顺序。

每个控件元素在数据表都有一个关联的单个字母。

  • l - 每页显示行数的控件
  • f - 检索条件的控件
  • t - 表格控件
  • i - 表信息总结的控件
  • p - 分页控件
  • r - 处理中的控件

还可以在控件元素外添加DIV和Class,语法如下

  • < and > - DIV元素
  • <"class" and > - DIV和Class
  • <"#id" and > - DIV和ID

Language说明

数据表的文言设置。

参数文档:

  1. {
  2. "emptyTable":     "No data available in table",
  3. "info":           "Showing _START_ to _END_ of _TOTAL_ entries",
  4. "infoEmpty":      "Showing 0 to 0 of 0 entries",
  5. "infoFiltered":   "(filtered from _MAX_ total entries)",
  6. "infoPostFix":    "",
  7. "thousands":      ",",
  8. "lengthMenu":     "Show _MENU_ entries",
  9. "loadingRecords": "Loading...",
  10. "processing":     "Processing...",
  11. "search":         "Search:",
  12. "zeroRecords":    "No matching records found",
  13. "paginate": {
  14. "first":      "First",
  15. "last":       "Last",
  16. "next":       "Next",
  17. "previous":   "Previous"
  18. },
  19. "aria": {
  20. "sortAscending":  ": activate to sort column ascending",
  21. "sortDescending": ": activate to sort column descending"
  22. }
  23. }

Example:

  • 没有检索元素
  1. /* Results in:
  2. <div class="wrapper">
  3. {length}
  4. {processing}
  5. {table}
  6. {information}
  7. {pagination}
  8. </div>
  9. */
  10. $('#example').dataTable( {
  11. "dom": 'lrtip'
  12. } );
  • 简单的DIV和样式元素设置
  1. /* Results in:
  2. <div class="wrapper">
  3. {filter}
  4. {length}
  5. {information}
  6. {pagination}
  7. {table}
  8. </div>
  9. */
  10. $('#example').dataTable( {
  11. "dom": '<"wrapper"flipt>'
  12. } );
  • 每页行数,检索条件,分页在表格上面,表信息在表格下面
  1. /* Results in:
  2. <div>
  3. {length}
  4. {filter}
  5. <div>
  6. {table}
  7. </div>
  8. {information}
  9. {pagination}
  10. </div>
  11. */
  12. $('#example').dataTable( {
  13. "dom": '<lf<t>ip>'
  14. } );
  • 表信息在表上面,检索条件,每页行数,处理中在表下面,并且有清除元素
  1. /* Results in:
  2. <div class="top">
  3. {information}
  4. </div>
  5. {processing}
  6. {table}
  7. <div class="bottom">
  8. {filter}
  9. {length}
  10. {pagination}
  11. </div>
  12. <div class="clear"></div>
  13. */
  14. $('#example').dataTable( {
  15. "dom": '<"top"i>rt<"bottom"flp><"clear">'
  16. } );
  • 实际应用
  1. /**

<style>

.float_left{

float: left;

}

.float_right {

float:right;

}

</style>

  1. */
  2. $('#dealsData').dataTable(
  3. {
  4. 'dom': '<"float_left"f>r<"float_right"l>tip',
  5. 'language': {
  6. 'emptyTable': '没有数据',
  7. 'loadingRecords': '加载中...',
  8. 'processing': '查询中...',
  9. 'search': '检索:',
  10. 'lengthMenu': '每页 _MENU_ 件',
  11. 'zeroRecords': '没有数据',
  12. 'paginate': {
  13. 'first':      '第一页',
  14. 'last':       '最后一页',
  15. 'next':       '',
  16. 'previous':   ''
  17. },
  18. 'info': '第 _PAGE_ 页 / 总 _PAGES_ 页',
  19. 'infoEmpty': '没有数据',
  20. 'infoFiltered': '(过滤总件数 _MAX_ 条)'
  21. }
  22. }
  23. );

效果图片

分享到:
 

JQuery Datatables Dom 和 Language 参数详细说明的更多相关文章

  1. Jquery.Datatables dom表格定位

    Datatables会添加一些控制元素在表格的周围,比如默认状态下改变每页显示条数(l)的空间在左上角,即使搜索框(f)在右上角,表格的信息(i)显示在左下角,分页控件(p)显示在右下角. 这些控件在 ...

  2. Jquery.Datatables dom表格定位 (转)

    Datatables会添加一些控制元素在表格的周围,比如默认状态下改变每页显示条数(l)的空间在左上角,即使搜索框(f)在右上角,表格的信息(i)显示在左下角,分页控件(p)显示在右下角. 这些控件在 ...

  3. JQuery Datatables Columns API 参数详细说明

    ---恢复内容开始--- Data Tables: http://datatables.NET/ Version: 1.10.0 Columns说明 虽然我们可以通过DOM直接获取DataTables ...

  4. JQuery中的AJAX参数详细介绍

    Jquery中AJAX参数详细介绍 参数名 类型 描述 url String    (默认: 当前页地址) 发送请求的地址. type String (默认: "GET") 请求方 ...

  5. 转载 Jquery中AJAX参数详细介绍

    Jquery中AJAX参数详细列表: 参数名 类型 描述 url String (默认: 当前页地址) 发送请求的地址. type String (默认: "GET") 请求方式 ...

  6. Jquery中AJAX参数详细(1)-转

    http://www.cnblogs.com/qiufuwu618/archive/2012/12/20/2826190.html Jquery中AJAX参数详细列表: 参数名 类型 描述 url S ...

  7. Jquery中AJAX参数详细介绍

    Jquery中AJAX参数详细列表: 参数名 类型 描述 url String (默认: 当前页地址) 发送请求的地址. type String (默认: "GET") 请求方式 ...

  8. Jquery Datatables 请求参数及接收参数处理

    Jquery Datatables 请求参数及接收参数处理 /** * Created by wb-wuyifu on 2016/8/9. */ /** * Created by wb-wuyifu ...

  9. jquery datatables api (转)

    学习可参考:http://www.guoxk.com/node/jquery-datatables http://yuemeiqing2008-163-com.iteye.com/blog/20069 ...

随机推荐

  1. 佛祖保佑 永无BUG 永不修改

    // // _oo0oo_ // o8888888o // 88" . "88 // (| -_- |) // 0\ = /0 // ___/`---'\___ // .' \\| ...

  2. ETL的数据来源,处理,保存

    1.ETL 数据来源:HDFS 处理方式:Mapreduce 数据保存:HBase 2.为什么保存在Hbase中 数据字段格式不唯一/不相同/不固定,采用hbase的动态列的功能非常适合 因为我们的分 ...

  3. 《Linux内核分析》第七周 可执行程序的装载

    [刘蔚然 原创作品转载请注明出处 <Linux内核分析>MOOC课程http://mooc.study.163.com/course/USTC-1000029000] WEEK SEVEN ...

  4. ng-bind-html 的原素没有高度

    angularjs里绑定html元素,在页面的div里使用ng-bind-html <!-- html--> <div class="info" ng-bind- ...

  5. UIWebView中Html中用JS调用OC方法及OC执行JS代码

    HTML代码: <html> <head> <title>HTML中用JS调用OC方法</title> <meta http-equiv=&quo ...

  6. docker入门的文章

    PART 1: OVERVIEW OF MICROSERVICE ARCHITECTURE & CONTAINERIZATION PART II: GETTING SET-UP AND STA ...

  7. 【转】HTTP 头部解释,HTTP 头部详细分析,最全HTTP头部信息

    HTTP 头部解释 ========================================================================================== ...

  8. [Android Tips] 17. Check APK Sign Info

    $ jarsigner -verify -verbose -certs <apk file path> 查看 keystore $ keytool -list -keystore debu ...

  9. 匈牙利命名法、骆驼命名法、帕斯卡(pascal)命名法

    (2008-05-24 13:37:55) 转载▼ 标签: 杂谈 分类: 编程杂文 一.匈牙利命名法:         广泛应用于象Microsoft Windows这样的环境中. Windows 编 ...

  10. 【001:转载 ubuntu下: 建立本地SVN服务器】

    1.安装 svn 工具 $sudo apt-get install subversion 2.  创建工程文件夹,用于存放工程 $mkdir ~/localsvn $mkdir ~/localsvn/ ...