</tr>
<%
Recordset1.MoveNext
If Recordset1.EOF OR Recordset1.BOF Then Exit For
Next
End If
%>
<tr bgcolor="#FFFFFF">
<td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr bgcolor="#006699" class="w12">
<td width="121" align="center"><% showPageInfo Recordset1.PageCount,PageNo %>
</td>
<td width="573" align="center">
<% showPageNavi Recordset1.PageCount,PageNo %>
</td>
</tr>
</table></td>
</tr>
</table> 这时你去点应用程序中的“服务器行为”中的记录集,在代码中就显示为一下代码,也是我的原代码:
<%
Dim I
Dim RPP’RPP:指定每页显示的记录条数,
Dim PageNo
I=1
RPP=50
PageNo=CInt(Request("PageNo"))
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_数据库名_STRING
Recordset1.Source = "SELECT * FROM 表名 ORDER BY 编号 ASC"
Recordset1.CursorType = 1
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
Recordset1.PageSize=RPP
If PageNo<=0 Then PageNo=1
If PageNo>Recordset1.PageCount Then PageNo=Recordset1.PageCount
Recordset1.AbsolutePage=PageNo
Sub ShowPageInfo(tPageCount,cPageNo)
Response.Write "第"&cPageNo&"页[共"&tPageCount&"页]"
End Sub
Sub ShowPageNavi(tPageCount,cPageNo)
If cPageNo<1 Then cPageNo=1
If tPageCount<1 Then tPageCount=1
If cPageNo>tPageCount Then cPageNo=tPageCount
Dim NaviLength
NaviLength=20 ’NaviLength:显示的数字链接个数
Dim I,StartPage,EndPage
StartPage=(cPageNo\NaviLength)*NaviLength 1
If (cPageNo Mod NaviLength)=0 Then StartPage=StartPage-NaviLength
EndPage=StartPage NaviLength-1
If EndPage>tPageCount Then EndPage=tPageCount
If StartPage>1 Then
Response.Write "<a class=""pageNavi"" href=""?PageNo=" & (cPageNo-NaviLength) & """><<</a> "
Else
Response.Write "<font color=""#CCCCCC""><<</font> "
End If
For I=StartPage To EndPage
If I=cPageNo Then
Response.Write "<b>"&I&"</b>"
Else
Response.Write "<a class=""pageNavi"" href=""?PageNo=" & I & """>" & I & "</a>"
End If
If I<>tPageCount Then Response.Write " "
Next
If EndPage<tPageCount Then
Response.Write " <a class=""pageNavi"" href=""?PageNo=" & (cPageNo NaviLength) & """>>></a>"
Else
Response.Write " <font color=""#CCCCCC"">>></font> "
End If
End Sub
%>
关键词:
【推荐给好友】【关闭】最新五条评论
查看全部评论
评论总数 0 条您的评论
·用户发表意见仅代表其个人意见,并且承担一切因发表内容引起的纠纷和责任·本站管理人员有权在不通知用户的情况下删除不符合规定的评论信息或留做证据
·请客观的评价您所看到的资讯,提倡就事论事,杜绝漫骂和人身攻击等不文明行为
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!



