标题:分页问题
只看楼主
cartaion
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2012-11-5
结帖率:66.67%
已结贴  问题点数:20 回复次数:2 
分页问题
<%@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
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
得分:20 
具体提示什么错误?而且你这个写法有很大问题
2012-11-19 16:13
cartaion
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2012-11-5
得分:0 
回复 2楼 yms123
有什么问题呀,这个问题提示缺少end
2012-11-26 08:48



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-387176-1-1.html




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

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