打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
ASP 分页显示代码
userphoto

2010.10.20

关注
<%
'连接数据库

'执行sql 改你要的sql
set rs=server.CreateObject("adodb.recordset")%>
rs.open "select * from news order by id desc ",conn,1,3

下面的代码就复制用可以了

'分页
i=50
rs.pagesize=i
pu=request("pu")
if pu="" then pu=1
if cint(pu)<="0" then pu=1
if cint(pu)>rs.pagecount then pu=rs.pagecount
if not rs.eof then rs.absolutepage=cint(pu)
'显示记录
if not rs.eof then
do while not rs.eof and i=>1
response.write rs("字段")'显示字段
'就这里改你要的,其它复制用就可以
rs.movenext
i=i-1
loop
end if
%>

当前第 <%=pu%> 页;分
<%=rs.pagecount%> 页;
共 <%=rs.recordcount%> 条记录;
每页<%=i%>条记录
<a href="?pu=1">首 页</a>
<a href="?pu=<%=cint(PU)-1%>">上一页</a>
<a href="?pu=<%=cint(PU)+1%>">下一页</a>
<a href="?pu=<%=rs.pagecount%>">末 页</a>
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
分页代码
ASP万用分页程序
ASP分页代码详解,代码解释!!
数据分页显示
asp + oracle 分页方法 (不用存储过程)
asp分页超级好用,
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服