日期:2014-05-16 浏览次数:20880 次
Lname=Request.QueryString("Lname")
set rs=server.CreateObject("adodb.recordset")
sql= "select * from youhua where youhua_category ='"&Lname&"' order by youhua_addtime ASC "
rs.open sql,conn,1,1
rs.pagesize=5
curpage=Request.QueryString("curpage")
if curpage="" then curpage=1
rs.absolutepage=curpage
部分分页代码
<%if curpage=1 then%>
上一页
<%else%>
<a href="?curpage=<%=curpage-1%>">上一页</a>
<%end if%>
<%if rs.pagecount<curpage+1 then%>
下一页
<%else%>
<a href="?curpage=<%=curpage+1%>">下一页</a>
<%end if%>
<%if rs.pagecount<curpage+1 then%>
尾页
<%else%>
<a href="?curpage=<%=rs.pagecount%>">尾页</a>