func
创新互联公司为您提适合企业的网站设计 让您的网站在搜索引擎具有高度排名,让您的网站具备超强的网络竞争力!结合企业自身,进行网站设计及把握,最后结合企业文化和具体宗旨等,才能创作出一份性化解决方案。从网站策划到
成都做网站、成都网站设计, 我们的网页设计师为您提供的解决方案。tion f_showPage() {
var pageHtml = '';
if (currentGroup > 0) {
pageHtml = pageHtml
+ "<a href='javascript:gridMainPreGroup()'><<</a> ";
}
else
{
pageHtml = pageHtml
+ "<a><<</a> ";
}
if (currentPage > 1) {
pageHtml = pageHtml
+ "<a href='javascript:gridMainPrePage()'><</a>"
}
else
{
pageHtml = pageHtml
+ "<a><</a> ";
}
var pageNum = currentGroup * 9 + 1;
for ( var i = 0; i < 9; i++) {
if (pageNum == currentPage) {
pageHtml = pageHtml
+ "<a class="current" href='javascript:gridMainChangePage("
+ pageNum + ")'>" + pageNum + "</a>"
} else {
pageHtml = pageHtml
+ "<a href='javascript:gridMainChangePage("
+ pageNum + ")'>" + pageNum + "</a>"
}
pageNum++;
}
pageHtml = pageHtml
+ "<a href='javascript:gridMainNextPage()'>></a>"
pageHtml = pageHtml
+ "<a href='javascript:gridMainNextGroup()'>>></a>"
$("#page").html(pageHtml);
}
function f_showBadPage() {
var pageHtml = '';
pageHtml = pageHtml
+ "<a><<</a> ";
pageHtml = pageHtml
+ "<a><</a> ";
var pageNum = currentGroup * 9 + 1;
for ( var i = 0; i < 9; i++) {
if (pageNum == currentPage) {
pageHtml = pageHtml
+ "<a class="current">" + pageNum + "</a>"
} else {
pageHtml = pageHtml
+ "<a>" + pageNum + "</a>"
}
pageNum++;
}
pageHtml = pageHtml
+ "<a>></a>"
pageHtml = pageHtml
+ "<a>>></a>"
$("#page").html(pageHtml);
}
function gridMainPreGroup() {
if(currentGroup > 0)
{
lastGroup = currentGroup;
lastPage = currentPage;
currentGroup = currentGroup - 1;
currentPage = currentGroup * 9 + 1;
}
f_showBadPage();
var parms = gridMain.get('parms');
parms.page = currentPage;
parms.pagesize = 30;
gridMain.set('parms', parms);
gridMain.loadData();
}
function gridMainPrePage() {
lastGroup = currentGroup;
lastPage = currentPage;
currentPage = currentPage - 1;
if (currentPage < currentGroup * 9 + 1) {
if (currentGroup > 0) {
currentGroup = currentGroup - 1;
}
}
f_showBadPage();
var parms = gridMain.get('parms');
parms.page = currentPage;
parms.pagesize = 30;
gridMain.set('parms', parms);
gridMain.loadData();
}
function gridMainChangePage(page) {
lastGroup = currentGroup;
lastPage = currentPage;
currentPage = page;
f_showBadPage();
var parms = gridMain.get('parms');
parms.page = currentPage;
parms.pagesize = 30;
gridMain.set('parms', parms);
gridMain.loadData();
}
function gridMainNextGroup() {
lastGroup = currentGroup;
lastPage = currentPage;
currentGroup = currentGroup + 1;
currentPage = currentGroup * 9 + 1;
f_showBadPage();
var parms = gridMain.get('parms');
parms.page = currentPage;
parms.pagesize = 30;
gridMain.set('parms', parms);
gridMain.loadData();
}
function gridMainNextPage() {
lastGroup = currentGroup;
lastPage = currentPage;
currentPage = currentPage + 1;
if (currentPage > currentGroup * 9 + 9) {
currentGroup = currentGroup + 1;
}
f_showBadPage();
var parms = gridMain.get('parms');
parms.page = currentPage;
parms.pagesize = 30;
gridMain.set('parms', parms);
gridMain.loadData();
}
网页名称:javascript分页-创新互联
本文链接:https://www.cdcxhl.com/article42/ihcec.html
成都网站建设公司_创新互联,为您提供营销型网站建设、网站维护、定制开发、标签优化、网站设计公司、App设计
广告
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源:
创新互联