| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 493 人关注过本帖
标题:分页问题
取消只看楼主 加入收藏
cartaion
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2012-11-5
结帖率:66.67%
收藏
已结贴  问题点数:20 回复次数:1 
分页问题
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
    dim conn
    set conn = server.createobject("ADODB.connection")
    conn.connectionstring="Provider = microsoft.ace.oledb.12.0;Data Source="&server.mappath("persondatabase.accdb")
    conn.open
        dim rs
        set rs = server.createobject("ADODB.recordset")
        rs.open "零件报价表",conn,1,1
%>
<html>
    <head>
        <title>分页技术</title>
        <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
        <style>
            *{ margin:0; padding:0; }
            body { font-szie:12px; color:#CC9900; font-family:"Times New Roman", Times, serif; background-color:#99CC66; }
            p { color:#000000; font-size:20px; }
            H6 { font-size:20px; font-weight:normal; text-align:center; }
            H6 a { padding:3px; text-decoration:none; color:#000000; }
            H6 a:hover { text-decoration:none; color:#FFCC00; }
            table { background-color:#99CC66; margin:10px auto; }
            table tr { background-color:#FFFF99; text-align:center;  }
            table tr th { font-size:14px; color:#FF0000; padding:10px;}
            table tr td { color:#CC9900; padding:10px;}   
        
        </style>
    </head>
    <body>               
        <%rs.pagesize=5%>
        <p><%=rs.pagecount%></p>
        <%rs.absolutepage=2%>
        <p><%=rs.absolutepage%></p>
        <H6><%
            for i=1 to rs.pagecount '这句代码原来是 do while not rs.eof 下面对应的是loop,现在做分页,换成for 语句之后错误提示下面的for 无效,是怎么回事
                response.write  "<a href='database_8.asp?page="&i&"'>"&i&"</a>"&"|"
            next
        %></H6>
        <table >
            <tr>
                <%
                    for i=0 to rs.fields.count-1
                %>
                <th><%=rs.fields(i).name%></th>
                <%
                    next
                %>
            </tr>
                <%
                    for i=0 to rs.pagesize
                %>
                    <tr>
                <%   
                    for i=0 to rs.fields.count-1
                %>               
                <td><%=rs.fields(i).value%></td>               
                <%
                        
                        next
                        rs.movenext
                %>
                </tr>
                <%
                   next                   
                %>            
        </table>
    </body>
</html>
<%
    conn.close
    set conn=nothing
%>

搜索更多相关主题的帖子: html content style title 
2012-11-15 19:05
cartaion
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2012-11-5
收藏
得分:0 
回复 2楼 yms123
有什么问题呀,这个问题提示缺少end
2012-11-26 08:48
快速回复:分页问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.028766 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved