create pagination using JS
<id= "Pat" style= "background: #efefef; border:1px solid #ccc;" ></ Div >
JS Code:
varTTA = 200;//Define Total$ (' #pp '). Pagination ({Total:tta, pageSize:10,//number of rows displayed per pageOnselectpage:function(PageNumber, PageSize) {//change the Trigger event after page number$( This). Pagination (' Loading '); Alert (' pagenumber: ' + pagenumber + ', pageSize: ' +pageSize); $( This). Pagination (' Loaded '); }, buttons: [{//Add New buttonIconcls: ' Icon-add ', Handler:function() {alert (' Add ')//Click the event after the new button } }, ‘-‘, {//Add Save buttonIconcls: ' Icon-save ', Handler:function() {alert (' Save ')//Click the event after the Save button } }] });
:
Common methods:
$ (' #pp '). Pagination (' refresh '); // Refresh page Bar information $ (' #pp '). Pagination (' Refresh ', { // change options, and Refresh page bar information total:114, 6 }); $ (' #pp '). Pagination (' select '); // Refresh the current page $ (' #pp '). Pagination (' select ', 2); // Select Second Page
It is also useful to refresh the current page and select pages
. Net+easyui Series--pagination pagination