jb51内容分页函数

2018-09-06 12:07

阅读:396

  复制代码 代码如下:
allpages=ubound(contentarray)
fordxy_ii=0toallpages
pagelist1=当前&dxy_ii+1&/&(allpages+1)&页
pagepre=
pagelast=
ifdxy_ii>0then
cpage=cint(dxy_ii)
ifcpage<0thencpage=0
ifcpage=1then
cpage1=id&.htm
else
cpage1=id&_&cpage&.htm
endif
pagepre=<ahref=&cpage1&>上一页</a>
endif
ifdxy_ii<allpagesthenpagelast=<ahref=&id&_&dxy_ii+2&.htm>下一页</a>
fordxy_i=0toallpages
ifdxy_i=0then
ifdxy_ii=dxy_ithen
alist=dxy_i+1&
else
alist=alist&<ahref=&id&.htm>&dxy_i+1&</a>
endif
else
ifdxy_ii=dxy_ithen
alist=alist&(dxy_i+1)&
else
alist=alist&<ahref=&id&_&dxy_i+1&.htm>&dxy_i+1&</a>
endif
endif
next
pagelist=pagelist1&pagepre&alist&ahlist&pagelast
alist=


评论


亲,登录后才可以留言!