页面链接怎么控制显示多少呢
形如百度的页面链接 最多显示20页[上一页] 2 3 ....21 [下一页]这样的
<% set rs=server.createobject("adodb.recordset") rs.open "select * from Gold order by id desc",conn,1,1 if rs.eof and rs.bof then Response.Write("暂时无订单!") else page=request.querystring("page") if page="" then page=1 end if pages = 20 '每页显示条数 rs.pagesize = pages maxpagecount=rs.pagecount rs.absolutepage = page i=0 pagestart=page-9 pageend=page+9 if pagestart<1 then pagestart=1 end if if pageend>maxpagecount then pageend=maxpagecount end if rcount=rs.RecordCount do while not rs.eof and i<rs.pagesize Response.Write("循环显示内容部分") rs.movenext i=i+1 loop end if rs.close set rs=nothing Response.Write("<a href=""?page=1""><<</a>") for n=pagestart to pageend if n=int(page) then Response.Write(" <font color=red><b>"&n&"</b></font> ") else Response.Write(" <a href=""?page="&n&""">"&n&"</a> ") end if next Response.Write("<a href=""?page="&maxpagecount&""">>></a>") Response.Write(" 共<font color=red>"&maxpagecount&"</font>页") Response.Write(" 每页<font color=red>"&pages&"</font>条") Response.Write(" 共<font color=red>"&rcount&"</font>条") %>