这是一个用下拉菜单来做翻页的通用代码,我觉得这样做比较省空间,蛮好的还有最后一段是前后翻页的按钮,呵呵,这个还是ccjat提醒后加上的。下面学步园小编来讲解下下拉菜单做翻页的通用代码有哪些?
下拉菜单做翻页的通用代码有哪些
记录集名字_total = 记录集名字.RecordCount
If (记录集名字_numRows 0) Then
记录集名字_numRows = 记录集名字_total
Elseif (记录集名字_numRows = 0) Then
记录集名字_numRows = 1
End If
记录集名字_first = 1
记录集名字_last = 记录集名字_first 记录集名字_numRows - 1
If (记录集名字_total > -1) Then
If (记录集名字_first > 记录集名字_total) Then 记录集名字_first = 记录集名字_total
If (记录集名字_last > 记录集名字_total) Then 记录集名字_last = 记录集名字_total
If (记录集名字_numRows > 记录集名字_total) Then 记录集名字_numRows = 记录集名字_total
End If
%
%
If (记录集名字_total = -1) Then
记录集名字_total=0
While (Not 记录集名字.EOF)
记录集名字_total = 记录集名字_total 1
记录集名字.MoveNext
Wend
If (记录集名字.CursorType > 0) Then
记录集名字.MoveFirst
Else
记录集名字.Requery
End If
If (记录集名字_numRows 0 Or 记录集名字_numRows > 记录集名字_total) Then
记录集名字_numRows = 记录集名字_total
End If
记录集名字_first = 1
记录集名字_last = 记录集名字_first 记录集名字_numRows - 1
If (记录集名字_first > 记录集名字_total) Then 记录集名字_first = 记录集名字_total
If (记录集名字_last > 记录集名字_total) Then 记录集名字_last = 记录集名字_total
下拉菜单做翻页的通用代码有哪些
End If
%
%
Set MM_rs = 记录集名字
MM_rsCount = 记录集名字_total
MM_size = 记录集名字_numRows
MM_uniqueCol = ""
MM_paramName = ""
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName > "") Then
MM_paramIsDefined = (Request.QueryString(MM_paramName) > "")
End If
%
%
if (Not MM_paramIsDefined And MM_rsCount > 0) then
r = Request.QueryString("index")
If r = "" Then r = Request.QueryString("offset")
If r > "" Then MM_offset = Int(r)
以上就是关于“下拉菜单做翻页的通用代码有哪些”的内容,希望对大家有用。更多资讯请关注学步园。学步园,您学习IT技术的优质平台!