代码如下:这个比较简单.
好好看看吧!
<!--#include file="conn.asp"-->
<%
rs.open "select * from data",cn,1,1
count=1'留言显示条数
rs.pagesize=count
rc=rs.recordcount
pgnm=rs.pagecount
page=Request.Querystring("page")
If page<>"" then page=clng(page)
If page="" or page=0 then page=1
If page>pgnm then page=pgnm
If pgnm>1 then rs.absolutepage=page
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>分页</title>
</head>
<body>
<div align="center">
<table border="0" width="19%" id="table1" height="72" style="border-collapse: collapse">
<%do while not rs.eof and count>0
count=count-1%>
<tr>
<td rowspan="2" align=center valign=middle><%=rs("name")%></td>
<td><%=rs("text")%></td>
</tr>
<%rs.movenext
loop
rs.close%>
<tr>
<td height="20" align=center valign=bottom><% If page>1 and pgnm>1 then %><a href="?page=<%=page-1%>&qq=<%=qq%>" class="STYLE1">上一页</a>
<%End If
If page<pgnm and pgnm>1 then
%> <a href="?page=<%=page+1%>&qq=<%=qq%>" class="STYLE1">下一页</a> <% End If %></td>
</tr>
</table>
</div>
</body>
</html>