js page click

Your account: Login / Register

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:

Javascript


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.

API

Events

Options

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.

时间: 2024-10-08 00:24:10

js page click的相关文章

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

common.js 1 var app = angular.module('app', ['ngFileUpload']) 2 .factory('SV_Common', function ($http) { 3 var data = { 4 WebService: '', 5 }; 6 var vm = { 7 log: function (par, par1) { 8 return; 9 if (par1) { 10 console.log('********** common: ' + p

js动态绑定click事件时function传参问题

今天碰到了这样一个问题,我在javascript中动态创建了一个button, 然后我想给改button添加click事件,绑定的function想要传入一个变量参数, 一开始我想直接通过函数传参传进来,然而不知道为什么,click事件无法正常响应, 最后发现可以这么做,将需要传入的参数加入button的属性中,然后通过getAttribute()获得: 1 function add_book_panel(infor){ 2 //在这个函数中进行DOM元素操作,需要传入参数infor 3 - 4

js解决click事件点击事件间隔方法

var myTimeout = null; $("#id").click(function(){ clearTimeout(myTimeout); myTimeout = setTimeout(function() { ... }, 5e3); });

Why we made vorlon.js and how to use it to debug your JavaScript remotely

Vorlon.js is powered by node.JS, socket.io, and late-night coffee. I would like to share with you why we made it, how to incorporate it into your own testing workflow, and also share some more details into the art of building a JS library like it. Re

小程序视图层(xx.xml)和逻辑层(xx.js)

整个系统分为两块视图层(View)和逻辑层(App Service) 框架可以让数据与视图非常简单地保持同步.当做数据修改的时候,只需要在逻辑层修改数据,视图层就会做相应的更新. 通过这个简单的例子来看: <!-- This is our View --> <view> Hello {{name}}! </view> <button bindtap="changeName"> Click me! </button> // Th

angular.js 渲染

angular.js 小常识   具体看代码,转载请备注来源. html结构 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ include file="../host.jsp"%> <%@ include file="../common.jsp"

项目组自己编写的js分页标签(百度分页)

/** * 分页工具 */ (function($) {$.extend({PageUtil:{}})})(jQuery); (function($) { $.extend($.PageUtil,{ //默认每页条数 _pageSize:10, //获取数据请求链接 _getDataUrl:"", //检索条件form的Id _filedFormId:"", //显示区域的Id _showId:"", //默认显示翻页标签个数 _showPage

使用Puppeteer进行数据抓取(二)——Page对象

page对象是puppeteer最常用的对象,它可以认为是chrome的一个tab页,主要的页面操作都是通过它进行的.Google的官方文档详细介绍了page对象的使用,这里我只是简单的小结一下. 客户端模拟 页面模拟设置相关函数有如下几个, page.setViewport: 设置视图大小 page.setUserAget: 设置UserAgent page.SetCookie: 设置Cookie 另外,也可以使用emulate函数提供快捷设置,puppeteer/DeviceDescript

微信小程序-06-详解介绍.js 逻辑层文件-注册页面

上一篇介绍的是 app.js 逻辑层文件中注册程序,对应的每个分页面都会有的 js 文件中 page() 函数注册页面 微信小程序-06-详解介绍.js 逻辑层文件-注册页面 宝典官方文档: https://developers.weixin.qq.com/miniprogram/dev/framework/MINA.html 今天开始深度学习编程语法,虽然大部分是拷贝官方文档,代码类都是我自己敲的,希望能自己敲一遍表格里的内容,熟悉一下操作 页面 Page Page(Object) Page(