[求助]分页函数的应用
<!--#Include file="conn.asp"--><!--#Include file="分页函数.inc"-->
<%
set adoPageRs=CreateObject("adodb.RecordSet")
adoPageRs.open "SELECT * FROM news ORDER BY addtime DESC", conn, 1, 1
if err.number> 0 then
response.write "数据库操作失败:"&err.description
else
if adoPageRs.eof and adoPageRs.bof then
response.write "没有记录"
else
%>
<div align="center">
<center>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr class="big">
<td width="60%">;新 闻 标 题</td>
<td width="25%" align="center">日期</td>
<td width="15%" align="center">操 作</td>
</tr>
<%
adoPageRs.pagesize = 5'设置一个页面显示的记录数
curpage=adoPageRs.absolutepage
for i = 0 to 9
%>
<tr>
<td><%=adoPageRs("title")%></td>
<td align="center"><%=adoPageRs("addtime")%></td>
<td align="center">
<a href='newsman.asp?action=edit&id=<%=adoPageRs("id")%>'>编辑</a>
<a href='javascript:confirmDel(<%=adoPageRs("id")%>)'>删除</a>
</td>
</tr>
<%
adopageRs.movenext
if adoPageRs.eof then
i=i+1
exit for
end if
next
%>
<tr>
<td><%=ExportPageInfo(adoPageRs,curpage,i,"newsman.asp?")%></td>
<td></td>
</tr>
</table>
</center>
</div>
<%
end if
end if
%>