首页
印 像 新 闻 系 统
网站首页 公告信息 编程实例 PHP函数 摄影无界 全景展示 我的作品 意见专栏
 

简单的数字分页

【2006年01月07日 14:52:51】 【阅读:次】 【字体:大 中 小 默认】 【背景:#换背景 #换背景 #换背景 #换背景 #换背景 #换背景 #换背景 默认】
<form action="<%=pageurl%>" method="post" >
        <table width=100% border="0" align="right" cellpadding="2" cellspacing="0" bgcolor="efefef" style="border-collapse:collapse;WORD-BREAK: break-all">
          <tr>
            <td height="22"><div align="center">
   <% 
Dim pageurl
pageurl="?d="&d&"&h="&h&"&"
 Pcount=rs.PageCount
 response.write "共有:<b>"&messagecount&"</b>条记录 "
 response.write "<a href="""&pageurl&"page=1"">第1页</a>"
    if Page > 4 then
  response.write " <a href="""&pageurl&"page=1"">[1]</a> ... "
 end if
 if Pcount>Page+3 then
  endpage=Page+3
 else
  endpage=Pcount
 end if
 for i=Page-3 to endpage
 if not i<1 then
  if i = clng(Page) then
        response.write " <font color=red>"&i&"</font> "
  else
        response.write "<a href="""&pageurl&"page="&i&""">["&i&"]</a>"
  end if
 end if
 next
 if Page+3 < Pcount then
  response.write " ...<a href="""&pageurl&"page="&Pcount&""">["&Pcount&"]</a> "
 end if
 response.write "<a href="""&pageurl&"page="&Pcount&""">第"&Pcount&"页</a>"
 %>
      </div>
<table border=0 cellpadding=0 cellspacing=0 width=100% height=1><tr><td background=images_message/dot_line.gif> </td></tr> </table>
   </td>
          </tr>
        </table>
      </form>

(『印像空间』 【本文来源:『学习笔记』】 【作者:未知】 【录入:留印】)
限200字,剩余 字
关 键 字:
    
搜索条件: