ASP分页函数
来源:
互联网
日期:2006-8-18
2.2 使用函数例2 <script language="JavaScript" type="text/JavaScript"> <!-- function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } //--> </script> <% RPP=50 '设置每页显示数目 I=1 '设置循环开始数目 showNumberLink_=10
toPage_="?yearview="&request.QueryString("yearview")&"&pageview=" nonLinkColor_="#CCCCCC"
Dim rs '定义链接名 Set rs = Server.CreateObject("ADODB.Recordset") '建立一个 rs 数据库查询 rs.ActiveConnection = MM_conn_STRING rs.CursorType = 1 '游标属性 rs.CursorLocation = 2 '游标位置 rs.LockType = 1 '定义数据库查询模式 rs.Open "select article.*, class.*, nclass.* from article, class, nclass where article.classid=class.classid and article.nclassid=nclass.nclassid and year(dateandtime)="&request.QueryString("yearview")&" order by dateandtime desc",MM_conn_STRING
%> <div CLASS="center"><% call fPageCount(RPP,rs,I,showNumberLink_,toPage_,nonLinkColor_) %></div> <% if rs.eof or rs.bof then else for i=1 to rpp %> <div class="floatRight80"><a href="<%=ddv_&rs("dateandtime")%>"><%=rs("dateandtime")%></a></div> <a href="<%=c1_&rs("article.classid")%>"><%= rs("class") %></a> -> <a href="<%=c1_&rs("article.classid")&c2_&rs("article.nclassid")%>"><%= rs("nclass") %></a> -> <a href="<%=a1_&rs("article.classid")&a2_&rs("article.nclassid")&a3_&rs("articleid")%>" target="_blank"><%= rs("title") %></a><p/> <% rs.movenext if rs.eof or rs.bof then exit for next end if%> <div CLASS="center"><% call fPageCount(RPP,rs,I,showNumberLink_,toPage_,nonLinkColor_) %></div> <% rs.close set rs=nothing %>
2.3 使用函数例3 <script language="JavaScript" type="text/JavaScript"> <!-- function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } //--> </script> <% RPP=50 '设置每页显示数目 I=1 '设置循环开始数目 showNumberLink_=10
toPage_="?monthview="&request.QueryString("monthview")&"&pageview=" nonLinkColor_="#CCCCCC"
Set rs = Server.CreateObject("ADODB.Recordset") '建立一个 rs 数据库查询 rs.ActiveConnection = MM_conn_STRING rs.CursorType = 1 '游标属性 rs.CursorLocation = 2 '游标位置 rs.LockType = 1 '定义数据库查询模式 rs.Open "select article.*, class.*, nclass.* from article, class, nclass where article.classid=class.classid and article.nclassid=nclass.nclassid and year(dateandtime)="&year(request.QueryString("monthview"))&" and "&"month(dateandtime)="&month(request.QueryString("monthview"))&" order by dateandtime asc",MM_conn_STRING
%> <div CLASS="center"><% call fPageCount(RPP,rs,I,showNumberLink_,toPage_,nonLinkColor_) %></div> <% if rs.eof or rs.bof then else for i=1 to rpp %> <div class="floatRight80"><a href="<%=ddv_&rs("dateandtime")%>"><%=rs("dateandtime")%></a></div> <a href="<%=c1_&rs("article.classid")%>"><%= rs("class") %></a> -> <a href="<%=c1_&rs("article.classid")&c2_&rs("article.nclassid")%>"><%= rs("nclass") %></a> -> <a href="<%=a1_&rs("article.classid")&a2_&rs("article.nclassid")&a3_&rs("articleid")%>" target="_blank"><%= rs("title") %></a><p/> <% rs.movenext if rs.eof or rs.bof then exit for next end if%> <div CLASS="center"><% call fPageCount(RPP,rs,I,showNumberLink_,toPage_,nonLinkColor_) %></div> <% rs.close set rs=nothing %>
更多的ASP分页函数请到论坛查看: http://BBS.TC711.COM
【 双击滚屏 】 【 评论 】 【 收藏 】 【 打印 】 【 关闭 】
来源:
互联网
日期:2006-8-18
|
|
|