这个好像是当初学asp的时候弄的 怀念下
<%
If Pmcount="" or isempty(Pmcount) or Pmcount<1 then
Pmcount=8
End If
rs.Pagesize = pmcount '设置每页数
Mpage = rs.Pagecount '得到总页数
Pageno = GetSafeInt(Clng(Request("Pageno")),1)
If Cint(Pageno) < 1 Then Pageno = 1
If Cint(Pageno) > Mpage Then Pageno = Mpage
If rs.Bof and rs.Eof then
Response.write "<center> 暂时没有任何新闻!</center>"
Else
rs.Absolutepage = Pageno '将指针移至指定页的第一条记录'
Loopno = Pmcount
i=1
Do While Not rs.Eof and Loopno > 0
%>
<%=( (Pageno-1) * rs.PageSize) + i%>
………………显示内容………………
<%
rs.Movenext
Loopno=Loopno-1
i=i+1
Loop
rs.Close
Set rs=Nothing
End if
%>
<form name="pageform" method="get" action="ly.asp">
当前为:<font color="#FF0000"><%=Cstr(Pageno)&"</font>/"&Cstr(Mpage)%>页
<%If Cint(Pageno)>1 Then%>
<font face="Webdings" color="#FF0000">7</font> <a href='ly.asp?cataid=<%=s_cataid%>&keyword=<%=s_keyword%>&pageno=<%=Pageno-1%>'>上一页</a>
<%End If
If Cint(Pageno) < Cint(Mpage) Then
%>
<font face="Webdings" color="#FF0000">8</font> <a href='ly.asp?cataid=<%=s_cataid%>&keyword=<%=s_keyword%>&pageno=<%=Pageno+1%>'>下一页</a>
<%End If%>
跳到第 <input type=text size=3 name="pageno" value="<%=pageno%>"> 页
<input type="hidden" name="cataid" value="<%=s_cataid%>">
<input type="hidden" name="keyword" value="<%=s_keyword%>">
<input type="submit" name="submit" value="跳转">
</form>
<%end if%>