⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pageasp.asp

📁 用来给从数据库返回出来的recordset数据进行在网页中分页
💻 ASP
字号:
<%
With Request
	If Trim(.QueryString("CurrentPage"))<>"" Then
		iCurrentPage= Trim(.QueryString("CurrentPage"))
	ElseIf Trim(.Form("CurrentPage"))<>"" Then
		iCurrentPage= Trim(.Form("CurrentPage"))
	Else
		iCurrentPage=1
	End If
End With

iPageRows	= 20
iPageNum	= Round((iData+1)/iPageRows+0.49999999)

If CInt(iPageNum) < 1 Then
	iPageNum = 1
End If

If Not IsNumeric(iCurrentPage) Then
	iCurrentPage = 1
ElseIf CInt(iCurrentPage) > CInt(iPageNum) Then
	iCurrentPage = iPageNum
End If

If CInt(iCurrentPage) < 1 Then
	iCurrentPage = 1
End If

If iCurrentPage > 1 Then
	iPerPage = iCurrentPage - 1
Else
	iPerPage = 1
End If

If CInt(iCurrentPage) < CInt(iPageNum) Then
	iNextPage = iCurrentPage + 1
Else
	iNextPage = iPageNum
End If

iFrom	= iPageRows * (iCurrentPage - 1)
iTo		= iFrom + iPageRows - 1

If iTo > iData Then
	iTo = iData
End If
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -