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. UIView画虚线边框

    //fatherView加虚线边框 -(void)boundingRectangleForView:(UIView *)fatherView{ CAShapeLayer *borderLayer = ...

  2. 分析app和wap手机网站的不同

    随着手机3G.4G时代的到来,手机功能的越来越强大,手机App的市场是越来越火爆,时代在更新随之而来的事物也在更新,不能更上时代的步伐是落后的表现,所以不仅仅是手机APP在完善,手机网站WAP也在不断 ...

  3. DNS分别在什么情况下使用UDP和TCP

    DNS同时占用UDP和TCP端口53是公认的,这种单个应用协议同时使用两种传输协议的情况在TCP/IP栈也算是个另类.但很少有人知道DNS分别在什么情况下使用这两种协议.     如果用wiresha ...

  4. scrum3.0

    3.0----------------------------------------------------- SCRUM 流程的步骤2: Spring 计划 1. 确保product backlo ...

  5. 夺命雷公狗-----React---9--map数据的遍历

    比如我们要实现的是这种效果: 用这种方法来写,她只能写死在哪,没啥意思,所以我们定义一个数据,然后来测试下map方法对她遍历出来的数据 <!DOCTYPE html> <html l ...

  6. 原生js快速渲染dom节点

    function renderDom(str){ var _div = document.createElement('div'); _div.innerHTML = str; var dom_tem ...

  7. for循环使用详解(c语言版)

    说明:c语言的很多语法部分都和JAVA,AS等相同 特别是for的用法. c语言中的for循环语句使用最为灵活,不仅可以用于循环次数已经确定的情况,而且可以用于循环次数不确定而只给出循环结束条件的情况 ...

  8. jenkins解决jenkins内存溢出问题

    在jenkins master-slave配置中,总是出现内存溢出问题,更换了机器设备仍然跑不起来: 问题如下: Status Code: 500 Exception: org.apache.comm ...

  9. python核心编程学习记录之函数与函数式编程

    @func function 意思是func(function) @func(a) function 意思是func(a)这是个函数对象,在去调用function函数 如果要传额外的值,只传值用*tu ...

  10. apache+php+mysql的配置(转载)

    windows: 按http://jingyan.baidu.com/article/fcb5aff797ec41edaa4a71c4.html的安装 按http://www.jb51.net/art ...