下拉菜单做翻页的通用代码
<P>这是一个用下拉菜单来做翻页的通用代码,我觉得这样做比较省空间,蛮好的 <BR>其实这个代码就是老外的那个翻页插件,后来是哪位好朋友(不好意思,忘了)修改后放在论坛上的,我还做成过插件,其实光是拷贝也挺方便的。<BR>还有最后一段是前后翻页的按钮,呵呵,这个还是ccjat提醒后加上的,用不用都随便咯。</P><P><%<BR>记录集名字_total = 记录集名字.RecordCount</P><P>If (记录集名字_numRows < 0) Then<BR>记录集名字_numRows = 记录集名字_total<BR>Elseif (记录集名字_numRows = 0) Then<BR>记录集名字_numRows = 1<BR>End If</P><P>记录集名字_first = 1<BR>记录集名字_last = 记录集名字_first 记录集名字_numRows - 1</P><P>If (记录集名字_total <> -1) Then<BR>If (记录集名字_first > 记录集名字_total) Then 记录集名字_first = 记录集名字_total<BR>If (记录集名字_last > 记录集名字_total) Then 记录集名字_last = 记录集名字_total<BR>If (记录集名字_numRows > 记录集名字_total) Then 记录集名字_numRows = 记录集名字_total<BR>End If<BR>%><BR><%</P><P>If (记录集名字_total = -1) Then</P><P>记录集名字_total=0<BR>While (Not 记录集名字.EOF)<BR>记录集名字_total = 记录集名字_total 1<BR>记录集名字.MoveNext<BR>Wend</P><P>If (记录集名字.CursorType > 0) Then<BR>记录集名字.MoveFirst<BR>Else<BR>记录集名字.Requery<BR>End If</P><P>If (记录集名字_numRows < 0 Or 记录集名字_numRows > 记录集名字_total) Then<BR>记录集名字_numRows = 记录集名字_total<BR>End If</P><P>记录集名字_first = 1<BR>记录集名字_last = 记录集名字_first 记录集名字_numRows - 1<BR>If (记录集名字_first > 记录集名字_total) Then 记录集名字_first = 记录集名字_total<BR>If (记录集名字_last > 记录集名字_total) Then 记录集名字_last = 记录集名字_total</P><P>End If<BR>%><BR><%<BR>Set MM_rs = 记录集名字<BR>MM_rsCount = 记录集名字_total<BR>MM_size = 记录集名字_numRows<BR>MM_uniqueCol = ""<BR>MM_paramName = ""<BR>MM_offset = 0<BR>MM_atTotal = false<BR>MM_paramIsDefined = false<BR>If (MM_paramName <> "") Then<BR>MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")<BR>End If<BR>%><BR><BR><%<BR>if (Not MM_paramIsDefined And MM_rsCount <> 0) then</P><P>r = Request.QueryString("index")<BR>If r = "" Then r = Request.QueryString("offset")<BR>If r <> "" Then MM_offset = Int(r)</P><p>本新闻共<font color=red>3</font>页,当前在第<font color=red>1</font>页<font color="red">1</font><a href="/Get/Website/Dreamweaver/058231651266075472_2.asp">2</a><a href="/Get/Website/Dreamweaver/058231651266075472_3.asp">3</a></p>
页:
[1]