首页
网页制作
网络编程
脚本专栏
数据库
网站运营
网络安全
平面设计
CMS教程
搜索
建站极客
网络编程
ASP编程
正文
本人常用的分页代码
所属分类:
网络编程
/
ASP编程
阅读数: 1986
收藏 0
赞 0
分享
个人会员管理
个人会员列表
序号
用户名
加入日期
等级
操作
<% dim maxperpage maxperpage=20 if not isempty(request("page")) then currentPage=cint(request("page")) else currentPage=1 end if filename="gr_member.asp" dim rs set rs=server.CreateObject("adodb.recordset") sql="select id,dxy_username,datetime,dj from "&gr_membertable&" order by id desc" rs.open sql,conn,1,1 if rs.eof then response.write "没有相关信息" else totalPut=rs.recordcount if currentpage<1 then currentpage=1 end if if (currentpage-1)*maxperpage>totalput then if (totalput mod maxperpage)=0 then currentpage=totalput\maxperpage else currentpage=totalput\maxperpage+1 end if end if if currentpage=1 then showcontent() showpage totalput,maxperpage,filename else if (currentpage-1)*maxperpage
">
<%=rs("dxy_username")%>
<%=rs("datetime")%>
<%=rs("dj")%>
">修改
)">删除
<% rs.movenext i=i+1 if rs.eof then exit do if i>maxperpage then exit do loop end sub %>
<% function showpage(totalnumber,maxperpage,filename) %>
<% dim n if totalnumber mod maxperpage=0 then n=totalnumber\maxperpage else n=totalnumber\maxperpage+1 end if %> 共有<%=totalnumber%>/<%=maxperpage%>条, 当前页<%=currentpage%>/<%=n%> <%if currentpage<2 then%> [首页] [上一页] <%else%>
[首页]
[上一页]
<%end if%><% if n-currentpage<1 then%> [下一页] [尾页]<%else%>
[下一页]
[尾页]
<%end if%> 转到:
<%for j=1 to n if currentpage=j then %>
<%=j%>
<% else %>
<%=j%>
<% end if next %>
<% end function %>
[Ctrl+A 全选 注:
引入外部Js需再刷新一下页面才能执行
]
更多精彩内容
其他人还在看
IIS访问ASP页面时报错The requested resource is in use.的解决办法
IIS访问ASP页面时报错The requested resource is in use.的解决办法
评论 0
收藏 0
赞 0
分享
错误类型:Provider (0x80004005)未指定的错误 的一个处理方法
一般情况下asp可以正常运行,但只要连接数据库就提示,Microsoft JET Database Engine 错误'80004005'
评论 0
收藏 0
赞 0
分享
关于“未指定的错误”的问题 的比较正解的解决方法
关于“未指定的错误”的问题 的比较正解的解决方法
评论 0
收藏 0
赞 0
分享
关于asp+access的安全问题分析
关于asp+access的安全问题分析
评论 0
收藏 0
赞 0
分享
把RS.GetRows看得更清楚
把RS.GetRows看得更清楚
评论 0
收藏 0
赞 0
分享
ASP面向对象编程探讨及比较
ASP面向对象编程探讨及比较
评论 0
收藏 0
赞 0
分享
ASP错误处理
ASP错误处理
评论 0
收藏 0
赞 0
分享
web文件管理器的后续开发
web文件管理器的后续开发
评论 0
收藏 0
赞 0
分享
上一篇,下一篇过程代码
上一篇,下一篇过程代码
评论 0
收藏 0
赞 0
分享
一小偷类!!有兴趣的可以看看
一小偷类!!有兴趣的可以看看
评论 0
收藏 0
赞 0
分享
查看更多
网络赚钱
更多
代刷信誉不能信,哪些网络兼职值得信赖呢?说说那些可靠的网络兼职
全面剖析日赚500元项目的骗局
网络赚钱的几种模式总结
企业网站通过流量变现有哪些关键的环节需要注意?
谷歌广告怎么收款?光大银行需要携带资料到柜台办理
六一儿童节微营销秘籍 互动吸粉6大招
站长故事
更多
为何说魅族的小米路线注定走不通?
一个大学生自述:我是如何把公司做死的
揭晓互联网三大巨头(百度,腾讯,阿里巴巴)和草根站长的往来
分享我经营网站的方法心得,希望大家能学到知识
年轻站长的苦逼SEO路:虽难却依旧顽强的坚持着
个人经历:盲目的坚持更新网站真的有用吗?