« 开启关闭USB读功能的REG注册表ASP批量写入数据的简单代码 »

asp分页前十后十页的代码

分类: 网页设计代码 发布: roger 浏览: 日期: 2011年4月26日

<%pagecount=rs.pagecount%>
<% strFile = "product.asp?owen="&owen&"&"
   if pagecount < 1 then pagecount = 1
   beginpage = 1  
   endpage = CInt(pagecount)  
   page = CInt(page)  
   if pagecount >= 9 then  
   if page >= 5 then  
   beginpage = page - 4  
   if page <= (pagecount - 4) then  
   endpage = page + 4  
   else
   endpage = pagecount  
   beginpage = pagecount - 4  
   end if
   else  
   beginpage = 1  
   endpage = 9  
   end if
   end if  
   if beginpage>1 then response.write"<a title=首页 href='"&strFile&logpage&"'><font face=webdings>9</font></a>"  
   for k = beginpage to endpage
   if k = page then
   response.write"<font color=#FF0000><b>["&k&"]</b></font> "  
   else
   response.write"[<a href='"&strFile&"page="&k&logpage&"'>"&k&"</a>] "  
   end if
   next  
   if endpage < pagecount then response.write("<a title=末页 href='"&strFile&"page="&pagecount&logpage&"'><font face=webdings>:</font></a>")  
   %>

相关文章:

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

Powered By Z-Blog 1.8 Walle Build 91204

Copyright 2008-2022 WWW.XMHJFB.COM Rights Reserved 闽ICP备16020319号