首页 > Web开发 > 详细

js page click

时间:2016-05-11 01:04:03      阅读:264      评论:0      收藏:0      [点我收藏+]

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:

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.

 

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.

js page click

原文:http://www.cnblogs.com/jinxiaosa/p/5479848.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!