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. 在 overlay 中运行容器 - 每天5分钟玩转 Docker 容器技术(51)

    上一节我们创建了 overlay 网络 ov_net1,今天将运行一个 busybox 容器并连接到 ov_net1: 查看容器的网络配置: bbox1 有两个网络接口 eth0 和 eth1.eth ...

  2. 使用Mapper专用的MyBatis Generator插件

    使用Maven执行MBG 这里有一个完整的例子,Mybatis-Spring,下面讲解的内容出自这个例子. 使用Maven插件的一个好处是可以将Maven中的属性使用${property}形式在gen ...

  3. 如何恢复未释放租约的HDFS文件

    之前有文章介绍过HDFS租约带来的问题,导致spark应用无法正常读取文件,只能将异常文件找出并且删除后,任务才能继续执行. 但是删除文件实在是下下策,而且文件本身其实并未损坏,只是因为已经close ...

  4. js验证15位或18位身份证

    本篇文章是本人在网上搜集了一些验证,然后又个人进行一定修改的关于身份证的验证,欢迎修改指正..... function IdCardValidateRule(idCard) { var tip;    ...

  5. NYOJ 5 Binary String Matching

    Binary String Matching 时间限制:3000 ms  |  内存限制:65535 KB 难度:3   描述 Given two strings A and B, whose alp ...

  6. maven系列小技巧之Top3 MVQ(most valuable question)

    首先声明,文章系个人原创 ,欢迎转载,转载请注明出处. 对于maven,有大神曾说过:如果你爱他,就请让他用Maven,因为那里是天堂,如果你恨他,就请让他用Maven,因为那里是地狱.尤其是mave ...

  7. JavaScript 排序算法(JavaScript sorting algorithms)

    JavaScrip 排序算法(JavaScript Sorting Algorithms) 基础构造函数 以下几种排序算法做为方法放在构造函数里. function ArrayList () { va ...

  8. PC网页版、移动客户端、Wap版 有什么不同

    测试周期中,可能会涉及到版本说明的词汇,比如:PC版.网页版.Web客户端.PC客户端.移动端.移动客户端.Wap版.H5. 关于"PC网页版"- 因为之前,基本没有PC终端业务,所以我们在通常的沟通 ...

  9. HTML5 — Wed Storage简单示例

    一.Wed Storage 概述 Wed Storage功能:在Wed上储存数据的功能,这里的储存是针对客户端本地而言的. 具体分为两种: sessionStorage,将数据保存在session对象 ...

  10. JAVASCRIPT 调用 OCX 的那些坑

    这个东西我之前已经想写了,但是在我写完"制作OCX","MFC应用OCX" 之后,html 调用OCX 就一直不成功,搞了好久,都快要放弃了.昨天领导需要我这边 ...