http://www.gzlight.com/gallery/show.php这种效果的分页如何写啊?

解决方案 »

  1.   

    可以参考一下下面的代码
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
    <!--#include file="../Connections/connwebinfo.asp" -->
    <% 
    dim sql
    sql="select * from topinfo where topinfo_show='显示'"
    set conn = Server.CreateObject("ADODB.Connection")
    conn.Open MM_connwebinfo_STRING
    set rs = Server.CreateObject("ADODB.Recordset")
    'rs = conn.Execute(sql)
    rs.open sql,conn,1,1
    %>
    <center>
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="771" id="AutoNumber1" height="89">
     
    <% do while not rs.eof  %> 
       <tr><%for i=1 to 5%>
       
        <td width="154" height="89">
        <p align="center"><a href="<%=trim(rs("topinfo_weburl"))%>" target="_blank">
        <img border="0" src="<%=(rs("topinfo_picpath"))%>" width="148" height="83" alt="<%=(trim(rs("topinfo_description")))%>"></a></td> <%  rs.movenext %>
        </td>
      
       <%if rs.eof then %>
       
       <%exit for
       end if %>
       <%next%> </tr>
      <% loop %>
    </table></center>
      

  2.   

    http://www.gzlight.com/gallery/show.php