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
%>
不过有一个缺点就是:如当你想找99页时点>>9次,要是有一个输入框,输入99后回车就到99就完美了。不知在DW+ASP中再怎么修改一下就能达到呢?期待。。。。:)