page

Since: DataTables 1.10

Page change event - fired when the table's paging is updated.

Description

The page event is fired the table's paging state changes. This can be the end user selecting the page to view or the page length from the built-in controls, or when the page state is altered by the API (page()).

Note that the page will be fired before the table has been redrawn with the updated data.

Please note that, as with all DataTables emitted events, this event is triggered with the dt namespace. As such, to listen for this event, you must also use the dt namespace by simply appending .dt to your event name, as shown in the example below.

Type

function function( e, settings )

Parameters:
  Name Type Optional
1 e

object

No
 

jQuery event object

2 settings

DataTables.Settings

No
 

DataTables settings object

Example

Show information about the current page using the API:

1
2
3
4
5
6
var table = $('#example').DataTable();
 
$('#example').on( 'page.dt'function () {
    var info = table.page.info();
    $('#pageInfo').html( 'Showing page: '+info.page+' of '+info.pages );
} );

Related

The following options are directly related and may also be useful in your application development.

Events

 

Comments (0)

No comments posted for this page yet. Be the first to contribute!

Post new comment

Contributions in the form of tips, code snippets and suggestions for the above material are very welcome. To post a comment, please use the form below. Text is formatted by Markdown.

To post comments, please sign in to your DataTables account, or register:

Any questions posted here will be deleted without being published.
Please post questions in the Forums. Comments are moderated.

DataTables designed and created by SpryMedia Ltd © 2007-2016. MIT licensed. Our Supporters
SpryMedia Ltd is registered in Scotland, company no. SC456502.

js page click的更多相关文章

  1. 2.26 js解决click失效问题

    2.26 js解决click失效问题 前言有时候元素明明已经找到了,运行也没报错,点击后页面没任何反应.这种问题遇到了,是比较头疼的,因为没任何报错,只是click事件失效了.本篇用2种方法解决这种诡 ...

  2. js & right click menu & 鼠标滑词

    js & right click menu & 鼠标滑词 // 鼠标滑词 mouseSlipGetWords() { const getSelectionText = () => ...

  3. js & right click menu

    js & right click menu https://stackoverflow.com/questions/4909167/how-to-add-a-custom-right-clic ...

  4. trao 模拟点击 & js auto click

    trao 模拟点击 & js auto click 日历上选择某一天,在 scrollview 自动定位到选择的那一天 click 后获取 item 的 e.target.offsetLeft ...

  5. js trigger click event & dispatchEvent & svg element

    js trigger click event & dispatchEvent & svg element but svg element not support trigger cli ...

  6. angularjs 1 开发简单案例(包含common.js,service.js,controller.js,page)

    common.js var app = angular.module('app', ['ngFileUpload']) .factory('SV_Common', function ($http) { ...

  7. 微信小程序 --- 设置app.js/page.js参数的方法

    设置 app.js 文件: //app.js App({ globalData: { is_login:false, userInfo:{} } }) 设置gloabalData的方法: // 定义a ...

  8. selenium+Python(Js处理click失效)

    有时候元素明明已经找到了,运行也没报错,点击后页面没任何反应.这种问题遇到了,是比较头疼的,因为没任何报错,只是 click 事件失效了. 问题: 1.在练习百度的搜索设置按钮时,点保存设置按钮,al ...

  9. jq和js中click 事件的几种方式总结和click事件的累加问题解决办法

     1:常见的三种绑定click事件: 第一种:$("#click").click(function(){ alert("Hello World  click") ...

随机推荐

  1. 贡献你的代码,将jar包发布到Maven中央仓库以及常见错误的解决办法

    前几天将自己的日志工具发布到了Maven中央仓库中.这个工具本省没有多少技术含量,因为是修改别人的源代码实现的,但是将jar发布到Maven仓库却收获颇丰,因为网上有些教程过时了,在此分享下自己发布j ...

  2. python3--网络爬虫--爬取图片

    网上大多爬虫仍旧是python2的urllib2写的,不过,坚持用python3(3.5以上版本可以使用异步I/O) 相信有不少人爬虫第一次爬的是Mm图,网上很多爬虫的视频教程也是爬mm图,看了某人的 ...

  3. UUID.randomUUID().toString() 的作用

    public static String createNewId(){ return UUID.randomUUID().toString() ; } UUID.randomUUID().toStri ...

  4. RMAN备份介质的移动与再恢复测试 [ catalog start with ‘dir’ ]

    --RMAN备份介质的移动与再恢复测试 ---------------------------------------------------------2013/09/21   由于目前生产环境中没 ...

  5. 巧妙利用JS中的自定义函数——化繁为简,提高效率

    利用自定义函数编写年月日时间表: (复杂写法)如下: <body>                <select id="year" size="1&q ...

  6. 自定义组件-BreadcrumbTreeView 的使用

    一.问题概述 树形结构是开发中常用的一种组织数据的结构,不少平台也提供了对应的控件.而在android平台中,出于使用手指操作树形结构不是很方便的原因,并没有提供树形结构控件.但在实际应用中,不可避免 ...

  7. OpenTK教程-2绘制一个三角形(正确的方法)

    上一个教程向我们展示了如何在屏幕上画一个三角形.但是,我说过,那是一种古老的方式,即使它能够正常运行,但是现在这已经不是"正确"的方式.上篇文章中我们将几何发送到GPU的方式是所谓 ...

  8. centos7破解mariadb密码

    第一步,停止运行mysql: systemctl stop mariadb.service 第二步,使用" -skip-grant-tables"参数重新启动mysql: mysq ...

  9. 【VMware Workstation】虚拟机静态IP NAT连接外部网络(局域网以及广域网)

    使用虚拟机时,为了减少后期的网络维护工作,配置网络IP时使用了NAT连接.静态IP的方式.这里把我的配置步骤顺序罗列出来. 一.配置虚拟网络编辑器 1.在VMware 的编辑菜单选择虚拟网络编辑器 2 ...

  10. linux命令后台执行

    fg.bg.jobs.&.nohup.ctrl+z.ctrl+c 命令 一.& 加在一个命令的最后,可以把这个命令放到后台执行,如 watch -n 10 sh test.sh &am ...