This example for you to share the Laypage front-end paging plug-ins, Ajax asynchronous paging, get the JSON data implementation without refreshing paging for your reference, the specific content as follows
function GetList (pageIndex) {var _this = "" var clone_this = ""; _this = $ (".
Binddatalist ");//Data listing container, Clone_this = _this.clone (true); var pageSize = 25;//The number of bars displayed per page $.ajax ({type: "Get", async:false,//asynchronous Lock, default to True URL: ".. /ashx/system/defaultajax.ashx ",//back-end processing data, returning JSON format: {" PageIndex ": PageIndex," pageSize ": PageSize,}, C Ontenttype: "Application/json;
Charset=utf-8 ", success:function (data) {var json = eval (" + Data + ")); if (JSON.
PageCount > 0)//data total number of bars {_this.html ("");
for (var i = 0; i < json.rows.length i++) {var html = "<li>json data </li>";
_this.append (HTML);
} jsonpage (JSON, PageIndex, pageSize);
else {_this.html ("");
_this.append ("");
}
}
}); function Jsonpage (JSON, PageIndex, Pagesize) {var coun = json. pagecount;//Total Data Bar number var PageCount = coun% PageSize = = 0? Coun/pagesize:coun/pagesize + 1;//calculates how many pages var Laypageindex = laypage ({cont: ' project_page ',//container.
The value supports the ID name, native DOM object, and jquery object. Skin: ' #fb771f ', pages:pagecount,//The total number of pages received through the background curr:pageindex,///Initialize the current page first: ' |< ',///show the homepage as Number 1,. If not shown, set False to last: ' >| ',////The end of the page as the total number of pages. If not, set false to prev: ' < ',//If not displayed, set false to Next: ' > ',//If not shown, set false jump:function (obj,
(a) {///Trigger paging callback if (!first) {//Click the page to trigger the function itself and pass the current page: Obj.curr Searchhottag (Obj.curr);
}
}
}); }
The above is the entire content of this article, I hope to learn laypage paging plug-ins have some inspiration and help, thank you for your reading.