您现在的位置: 军旅同心-旅游自驾-军旅文学 >> 读书赏析 >> 学习园地 >> 电脑网络 >> 技术文章 >> 正文
2栏分页显示(附显示的形式前页,后页)
作者:采集员 文章来源:来源于网络 点击数: 更新时间:2005-9-10 12:30:43
       
            dim i
            dim k
%>
        <tr align="center" valign="middle">
            <td width="25%">ID1</td>
            <td width="25%">name1</td>
            <td width="25%">ID2</td>
            <td width="25%">name2</td>
        </tr>
        <%do while not rs.eof and rowcount > 0%>
        <tr align="center" valign="middle">
            <td width="25%"><%=rs("id")%></td>
            <td width="25%"><%=rs("testname")%></td>
            <td>
                <%
                    rowcount=rowcount-1
                    rs.MoveNext
                    if not rs.EOF then
                %>
                        <%=rs("id")%>
            </td>
            <td width="25%"><%=rs("testname")%></td>
        </tr>
<%
                        rowcount=rowcount-1
                        rs.MoveNext
                    else
                        Response.Write "&nbsp;</td><td>&nbsp;</td></tr>"
                    end if
          loop
        end if
    end if
    rs.close
    set rs=nothing
%>
  
</table>
<table border="0" align="center">
  <tr>
    <td align="center" valign="middle">
      <%call listPages()%>
    </td>
  </tr>
</table>
</body>
</html>
<%
    sub listPages()                                                                
        if n <= 1 then exit sub                                                    
%>
        <p><span class=smallFont>&gt;&gt;
        <%if currentpage    =    1 then%>
            <font color=darkgray face="arial" >Top Previous</font>
        <%else%>                                                                    
            <font color=black face="arial"><a href="<%=request.ServerVariables("script_name")%>?page=1">Top</font></a>
            &nbsp<a href="<%=request.ServerVariables("script_name")%>?page=<%=currentpage-1%>">
            <font color=black face="arial" >Previous</a></font>
        <%end if%>
        <%if currentpage    =    n then%>                                                    
            <font color=darkgray face="arial" >Next Bottom</font>
        <%else%>                                                                    
            <font color=black face="arial" ><a href="<%=request.ServerVariables("script_name")%>?page=<%=currentpage+1%>">Next</a>
            &nbsp<a href="<%=request.ServerVariables("script_name")%>?page=<%=n%>">Bottom</a></font>
        <%end if%>
        <font color=black face="arial" >
        &nbsp Page:<%=currentpage%>/<%=n%>pages&nbsp&nbsp<%=msg_per_page%>notes/page &nbsp Total:<%=totalrec%>notes</font></span></p>
  <%end sub%>

上一页  [1] [2] 


更多
免责声明:作品版权归所属媒体与作者所有!!本站刊载此文不代表同意其说法或描述,仅为提供更多信息。如果您认为我们侵犯了您的版权,请告知!本站立即删除。有异议请联系我们。
文章录入:烟灰缸    责任编辑:烟灰缸 
网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
| 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 网站地图 | 版权申明 | 网站公告 | 管理登录 |