又一个关于分页的问题!

yanzhu 2002-10-12 03:47:00
我想做一个分页,是下面显示“1、2、3....”
不是 “首页、上一页、下一页....”
谁有原代码最好!
在线等!!!
...全文
27 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
yanzhu 2002-10-12
  • 打赏
  • 举报
回复
谢谢!我知道了!一时糊涂了,一样的写法!
tmouse 2002-10-12
  • 打赏
  • 举报
回复
自己看吧。
<%
Rs.pagesize=4
page=Request("page")
if (page-Rs.pagecount) >= 0 then
page=Rs.pagecount
elseif page = "" or page < 2 then
page = 1
end if
Rs.absolutepage=page
do while not Rs.eof
i = i + 1
if i > Rs.pagesize then
exit do
end if
%>
<tr>
<td width="50" height="1" rowspan="2">
</td> <td width="178" height="10"> <p align="right"> 共有<%=page%>/<%=Rs.pagecount%>页   
跳到第<% for go=1 to Rs.pagecount%><a href=history.asp?page=<%=go%>><%=go%></a> <%next%>页   
<%
if page<>1 then
%><a href=history_content.asp?page=<%=page-1%>>上一页</a> 
<%
end if
%>
<%
if page<>rs.pagecount then
%><a href=history_content.asp?page=<%=page+1%>>下一页</a> 
<%
end if
%></td>
</tr><%rs.close
set rs=nothing
conn.close
set conn=nothing
%>

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧