. Net + easyui series -- Pagination paging, easyui -- pagination
Create a page with JS
<div id="pat" style="background:#efefef;border:1px solid #ccc;"></div>
JS Code:
Var tta = 200; // The total number of definitions $ ('# pp '). pagination ({total: tta, pageSize: 10, // The number of lines displayed per page onSelectPage: function (pageNumber, pageSize) {// trigger event after page number change $ (this ). pagination ('loading'); alert ('pagenumber: '+ pageNumber +', pageSize: '+ pageSize); $ (this ). pagination ('loaded') ;}, buttons: [{// add button iconCls: 'icon-add', handler: function () {alert ('add ') // click the event after the Add button }}, '-', {// Add the save button iconCls: 'icon-save', handler: function () {alert ('save') // event after clicking the save button}]});
:
Common Methods:
$ ('# Pp '). pagination ('refresh'); // refresh the page information $ ('# PP '). pagination ('refresh', {// modify the option, and refresh the page column information total: 114, pageNumber: 6}); $ ('# pp '). pagination ('select'); // refresh the current page $ ('# pp '). pagination ('select', 2); // select the second page
It is useful to refresh the current page and select the page