来自 新葡亰服务器 2019-11-27 06:51 的文章
当前位置: 澳门新葡亰app > 新葡亰服务器 > 正文

依照jQuery的js分页代码_jquery_脚本之家

澳门新葡亰官网APP,澳门新葡亰app,复制代码 代码如下: function pagerBar(dataCount,pageSize,serverUrl,contentPlace,pagerbarPlace,callBack){ this.dataCount = dataCount; this.pageSize = pageSize; this.serverUrl = serverUrl; this.contentPlace = $; this.pagerbarPlace = $; this.callBack = callBack; this.pageCount = 0; this.pageIndex = 1; this.curInfo = $; this.prePage = $; this.nextPage = $; this.init(); } pagerBar.prototype = { init : function(){ this.getPageCount; this.showBarInfo(); if{ this.setLink; } }, getPageCount : function(){ this.pageCount = parseInt(this.dataCount / this.pageSize); if(this.dataCount % this.pageSize !=0){ this.pageCount++; } }, initLink : function(){ var self = this; this.prePage = $.html.addClass; this.prePage.click{ self.setLink; this.nextPage = $.html.addClass; this.nextPage.click{ self.setLink; this.pagerbarPlace.append.append.append; }, showBarInfo : function(){ this.prePage.hide(); this.nextPage.hide(); if{ this.curInfo.html; } else if{ this.curInfo.html; } else{ this.curInfo.html(this.pageCount + "/" + this.pageIndex); } }, setLink : function{ var self = this; $.ajax({ url:self.serverUrl, type:"get", data:{pageSize:self.pageSize,pageIndex:i}, cache:false, error:function; }, success:function{ self.contentPlace.html; if{ self.prePage.hide(); self.nextPage.hide{ self.prePage.hide(); self.nextPage.show(); }else if{ self.prePage.show(); self.nextPage.hide(); }else{ self.prePage.show(); self.nextPage.show(); } } self.pageIndex = i; self.curInfo.html(self.pageCount+"/"+self.pageIndex); if{ self.callBack; }, changeServerUrl : function{ this.dataCount = dataCount; this.serverUrl = serverUrl; this.pageIndex=1; this.getPageCount; this.contentPlace.html; if{ this.setLink; } }, dataCountDec : function(){ this.dataCount--; this.getPageCount(); if(this.pageCount

本文由澳门新葡亰app发布于新葡亰服务器,转载请注明出处:依照jQuery的js分页代码_jquery_脚本之家

关键词: