请问谁有类似google或者baidu的ASP分页代码?

来源:百度知道 编辑:UC知道 时间:2024/06/08 00:52:04
显示效果如下:
1 2 3 4 5 6 7 8 9 10 下一页(第一页时)
1 2 3 4 5 6 7 8 9 10 11 下一页(第二页时)
1 2 3 4 5 6 7 8 9 10 11 12 下一页(第三页时)
.....依此类推,但最多只能显示19个页吗?

这个效果我真的不知道用ASP怎么来实现,请大家帮忙。谢谢!!

<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
.style1 {font-size: 14px}
-->
</style>

<%
'敛接数据库
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.mappath("db1.mdb")+";Persist Security Info=False"
set conn = Server.CreateObject("ADODB.Connection")
conn.open strConn
%>
内容显示>>><br><br>
<%
'内容循环前
set rs=server.createobject("adodb.recordset")
sql="select * from 表1"
rs.open sql,conn,1,3
page=1 ' 设置变量PAGE=1
rs.PageSize = 5 '每页显示记录数
if Not IsEmpty(Request("Page")) then '如果PAGE已经初始化...
Page = CInt(Request("Page")) '接收PAGE并化为数字型赋给PAGE变量
if Page > rs.PageCount then '如果接收的页数大于总页数
rs.AbsolutePage = rs.PageCount '设置当前显示页等于最后页
elseif Page <