关于具体分页显示问题!(我用的是dreamweaver)

vbscript1981 2003-12-18 10:18:04
(我用的是dreamweaver)
就像本论坛一样。共显示10笔记录,每笔记录显示10条。用1-11做为链接。

(最新:301篇 1 2 3 4 5 6 7 8 9 10 11 )
我想达到以上这样效果。
望各位大师帮帮忙!在下感激不尽!!!

...全文
153 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
b4ys 2003-12-18
  • 打赏
  • 举报
回复
以下是我写的程序,你只要把下面的index.asp换成你自己的页面就可以用了

<%
p=request("p")
if p="" then
p=1
else
p=cint(p)
end if
if p>1 then
%>
<a href="index.asp?page=<%=page%>&p=<%=p-1%>">向前10页</a>
<% end if

if (p*10)>=rs.pagecount then
for y=((p-1)*10+1) to rs.pagecount
if y=page then
response.write"[<font color='#ff0000'>"&y&"</font>] "
else
response.write"[<a href='index.asp?page="&y&"&p="&p&"' class='xiahuanxian'>"&y&"</a>] "
end if
next
else
for q=((p-1)*10+1) to (p*10)
if q=page then
response.write"[<font color='#ff0000'>"&q&"</font>] "
else
response.write"[<a href='index.asp?page="&q&"&p="&p&"'>"&q&"</a>] "
end if
next
end if
if (p*10)<=rs.pagecount then
%>
<a href="index.asp?page=<%=page%>&p=<%=p+1%>">向后10页</a><% end if %>
国手 2003-12-18
  • 打赏
  • 举报
回复
用 for 把 pagecount 循环就可以了
没循环一次你指定它连接到那个页面就可以了。
swich 2003-12-18
  • 打赏
  • 举报
回复
在google里搜索“分页”能找到很多的
flywolfkyo 2003-12-18
  • 打赏
  • 举报
回复
?
bzscs 2003-12-18
  • 打赏
  • 举报
回复
找个动网论坛,看看它是怎么进行分页的
Primer2002cn 2003-12-18
  • 打赏
  • 举报
回复
取出PageCount写出连接,取PageNo就可以啦

28,391

社区成员

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

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