注册
 找回密码
 注册
江西广告网
查看: 371|回复: 0
打印 上一主题 下一主题

下拉菜单做翻页的通用代码

[复制链接]

该用户从未签到

1
跳转到指定楼层
发表于 2008-12-5 10:10:39 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?注册

x

这是一个用下拉菜单来做翻页的通用代码,我觉得这样做比较省空间,蛮好的
其实这个代码就是老外的那个翻页插件,后来是哪位好朋友(不好意思,忘了)修改后放在论坛上的,我还做成过插件,其实光是拷贝也挺方便的。
还有最后一段是前后翻页的按钮,呵呵,这个还是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)

本新闻共3页,当前在第11 2 3

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表