马上注册,结交更多好友,享用更多功能,让你轻松玩转闽南师范大学。
您需要 登录 才可以下载或查看,没有账号?立即加入
×
这是一个用下拉菜单来做翻页的通用代码,我觉得这样做比较省空间,蛮好的
+ l$ X/ Q$ X+ {1 _+ u" c0 `% W其实这个代码就是老外的那个翻页插件,后来是哪位好朋友(不好意思,忘了)修改后放在论坛上的,
6 Q* }( j6 I. I; {- M& }' t5 Z还有最后一段是前后翻页的按钮,呵呵,这个还是ccjat提醒后加上的,用不用都随便咯。
7 i1 j) ]# }8 r3 k<%
3 _# \9 J! o9 |1 P% N记录集名字_total = 记录集名字.RecordCount
+ R( T" C8 J* G& u: hIf (记录集名字_numRows < 0) Then
" E8 u/ j4 _' G1 j$ v4 F+ f记录集名字_numRows = 记录集名字_total, L, Q% g$ j1 E* E' q5 t
Elseif (记录集名字_numRows = 0) Then |$ a& O1 N% ^% ?
记录集名字_numRows = 1
7 J& ?6 z( G) s) g( QEnd If; E. s: N2 U. v, p' J4 }
记录集名字_first = 1) Y, g3 M# a9 V# {! f: y
记录集名字_last = 记录集名字_first + 记录集名字_numRows - 1' X1 }8 V/ e @$ @/ |3 u
If (记录集名字_total <> -1) Then
) q9 I2 Y0 }# D0 UIf (记录集名字_first > 记录集名字_total) Then 记录集名字_first = 记录集名字_total& f! r; N0 S; ^, k, i* g
If (记录集名字_last > 记录集名字_total) Then 记录集名字_last = 记录集名字_total4 x+ k9 Y! i3 j
If (记录集名字_numRows > 记录集名字_total) Then 记录集名字_numRows = 记录集名字_total
7 O7 m% {! J& `* f$ I; v+ C: NEnd If) N& F- o. Z6 b% J' }/ [- K
%><%1 o& ~! T/ t" l9 Z M* `$ a
If (记录集名字_total = -1) Then
0 G3 `( \6 m7 [6 q- E7 t$ _记录集名字_total=0
7 J; T1 C. g! E. DWhile (Not 记录集名字.EOF)
- d V& ]% i4 A1 L; o* l记录集名字_total = 记录集名字_total + 1
H3 _9 w& z/ W记录集名字.MoveNext' o" L7 A" |4 x, B+ f4 B
Wend
( c" e2 t% q1 f! bIf (记录集名字.CursorType > 0) Then
3 z0 B2 B, c! n0 z记录集名字.MoveFirst
1 E P) H: h2 f2 r- n& y% WElse; ~0 y9 P$ x c- _5 j. j
记录集名字.Requery
/ w* V# X. B( u6 MEnd If; O# {7 P+ W* R$ `
If (记录集名字_numRows < 0 Or 记录集名字_numRows > 记录集名字_total) Then6 c- u- T0 L2 d, q! _9 _
记录集名字_numRows = 记录集名字_total5 X! o' u. E v) j( H4 S& w
End If
8 R" b- N2 |. x9 E0 Y记录集名字_first = 19 R& i& N" ?5 Y: G- E8 q
记录集名字_last = 记录集名字_first + 记录集名字_numRows - 1+ n0 P w" s( y1 r& L
If (记录集名字_first > 记录集名字_total) Then 记录集名字_first = 记录集名字_total/ `; D$ y' _% c) {9 u' N7 N, n
If (记录集名字_last > 记录集名字_total) Then 记录集名字_last = 记录集名字_total! y5 S7 Y3 K( r E& @
End If9 `/ J; F& u7 y6 n. B
%><%
6 \" i) S, D. G! a4 HSet MM_rs = 记录集名字) `, u8 u+ A& s9 P- W4 b+ x; M
MM_rsCount = 记录集名字_total
: e+ b, N/ P2 e: J& XMM_size = 记录集名字_numRows3 ]* {( H% ^! x2 ~
MM_uniqueCol = ""; q: ?( G! F- b% }6 f, B- B
MM_paramName = ""8 n: F3 m. k! i5 M
MM_offset = 0
; i1 ~. }2 a' ]& ]! oMM_atTotal = false
6 G. b9 E. E! b: k$ r. L3 fMM_paramIsDefined = false
( f! |* c' E; {If (MM_paramName <> "") Then
9 n7 p1 d3 ?& ~0 vMM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")2 b. k3 Q G, d8 l3 X/ h$ K
End If
J0 V% W+ A0 M7 z. `%><%% \4 n5 |3 [7 m9 d
if (Not MM_paramIsDefined And MM_rsCount <> 0) then
; Y1 A' Y# t/ ?9 v7 M& x ?r = Request.QueryString("index")
3 Q/ {% t7 s, K `If r = "" Then r = Request.QueryString("offset")% p; w$ X' H* y2 B! P
If r <> "" Then MM_offset = Int(r) |