dw php分页插件,下拉菜单做翻页的通用代码

这是一个用下拉菜单来做翻页的通用代码,我觉得这样做比较省空间,蛮好的

其实这个代码就是老外的那个翻页插件,后来是哪位好朋友(不好意思,忘了)修改后放在论坛上的,我还做成过插件,其实光是拷贝也挺方便的。

还有最后一段是前后翻页的按钮,呵呵,这个还是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页,当前在第1页 1 2 3

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值