当前位置: 首页 > 图文教程 > 网络编程 > ASP > 内容分页函数

ASP
认识和优化connection对象
优化你的ASP程序
ASP实现简单的网页保护
在ASP中限制同一表单被多次提交
Request 对象 属性和方法
asp的Request对象
全角与半角字符的相互转换的asp函数
asp session 使用数组
防止ASP Session丢失的方法
cookies和session的关系
无组件不能上传rar,zip其它非图片文件
网站设计时应注意的SEO细节
asp代码--fso创建文件夹
ASP转化ip地址为长整型数字
关于script的dictionary对象的用法
asp过滤不文明字符的函数
fso删除当前文件夹下所有的内容
asp中将字符转换成变量使用
asp数组随机排序
解决asp被杀毒软件误删的方法

ASP 中的 内容分页函数


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 64 ::
收藏到网摘: n/a

复制代码 代码如下:

allpages=ubound(contentarray)
for dxy_ii=0 to allpages
pagelist1="当前"&dxy_ii+1&"/"&(allpages+1)&"页 "
pagepre=""
pagelast=""
if dxy_ii>0 then
cpage=cint(dxy_ii)
if cpage<0 then cpage=0
if cpage=1 then
cpage1=id&".htm"
else
cpage1=id&"_"&cpage&".htm"
end if
pagepre="<a href="&cpage1&">上一页</a> "
end if
if dxy_ii<allpages then pagelast="<a href="&id&"_"&dxy_ii+2&".htm>下一页</a>"
for dxy_i=0 to allpages
if dxy_i=0 then
if dxy_ii=dxy_i then
alist=dxy_i+1&" "
else
alist=alist&"<a href="&id&".htm>"&dxy_i+1&"</a> "
end if
else
if dxy_ii=dxy_i then
alist=alist&(dxy_i+1)&" "
else
alist=alist&"<a href="&id&"_"&dxy_i+1&".htm>"&dxy_i+1&"</a> "
end if
end if
next
pagelist=pagelist1&pagepre&alist&ahlist&pagelast
alist=""