最近网站改版正好发现原来的分页不带数字的
照旧看点简朴的吧,正好研究并分享下, 15,都是以前较量风行的,需要的伴侣可以参考下 结果: 海外的焦点代码: 复制代码 代码如下: % digg style pagination script in asp.. written by Moazam... function getPaginationString(page, rounded up. lpm1 = lastpage - 1last page minus 1 Now we apply our rules and draw the pagination object. Were actually saving the code to a variable in case we want to draw it more than once. pagination = if lastpage 1 then pagination = pagination div class=pagination if margin OR padding then pagination = pagination style= if margin then pagination = pagination margin: margin end if if padding then pagination = pagination padding: padding end if pagination = pagination end if pagination = pagination previous button if page 1 then pagination = pagination a href=http://www.zzvips.com/article/targetpagepage=prevPrev/a else pagination = pagination span class=disabledPrev/span end if pages if lastpage 7 + (adjacents * 2) thennot enough pages to bother breaking it up for counter = 1 to lastpage if counter = page then pagination = pagination span class=currentcounter/span else pagination = pagination a href=http://www.zzvips.com/article/targetpagepage=countercounter/a end if next elseif lastpage = 7 + (adjacents * 2) thenenough pages to hide some close to beginning only hide later pages if page 1 + (adjacents * 3) then for counter = 1 to (4 + (adjacents * 2))-1 if counter = page then pagination = pagination span class=currentcounter/span else pagination = pagination a href=http://www.zzvips.com/article/targetpagepage=countercounter/a end if next pagination = pagination ... pagination = pagination a href=http://www.zzvips.com/article/targetpagepage=lpm1lpm1/a pagination = pagination a href=http://www.zzvips.com/article/targetpagepage=lastpagelastpage/a in middle hide some front and some back elseif lastpage - (adjacents * 2) page AND page (adjacents * 2) then pagination = pagination a href=http://www.zzvips.com/article/targetpagepage=11/a pagination = pagination a href=http://www.zzvips.com/article/targetpagepage=22/a pagination = pagination ... for counter = (page - adjacents) to (page + adjacents) if counter = page then pagination = pagination span class=currentcounter/span else pagination = pagination a href=http://www.zzvips.com/article/targetpagepage=countercounter/a end if next pagination = pagination ... pagination = pagination a href=http://www.zzvips.com/article/targetpagepage=lpm1lpm1/a pagination = pagination a href=http://www.zzvips.com/article/targetpagepage=lastpagelastpage/a close to end only hide early pages else pagination = pagination a href=http://www.zzvips.com/article/targetpagepage=11/a pagination = pagination a href=http://www.zzvips.com/article/targetpagepage=22/a pagination = pagination ... for counter = (lastpage - (1 + (adjacents * 3))) To lastpage if counter = page then pagination = pagination span class=currentcounter/span else pagination = pagination a href=http://www.zzvips.com/article/targetpagepage=countercounter/a end if next end if end if nextPage button if page counter - 1 then pagination = pagination a href=http://www.zzvips.com/article/targetpagepage=nextPageNext/a else pagination = pagination span class=disabledNext/span end if pagination = pagination /div vbnewline end if getPaginationString = pagination end function function Ceil( dividend, 2, divider) if (dividend mod divider) = 0 Then Ceil = dividend / divider ELSE Ceil = Int(dividend / divider) + 1 End if End function test script code page = 1 if request(page) then page=cint(request(page)) end if ps = getPaginationString(page,而此刻较量风行的是数字分页在中间,只有首页 上页 下页 末页 然后是select的跳转。
asp与php思想差不多啊。
只有首页 上页 下页 末页 然后是select的跳转,需要的伴侣可以参考下 最近网站改版正好发明本来的分页不带数字的, 1500。
最近网站改版正好发明本来的分页不带数字的。
参考了dedecms的修改要领 结果图: 焦点代码: 复制代码 代码如下: ps=cint(pageno)-2 if ps1 then ps=1 end if pe=clng(pageno)+5 if pempage then pe=mpage for i=ps to pe if i=pageno then lb=lbstrongi/strong else lb=lba href=http://www.zzvips.com/article//list/list_theid_i.htmi/a end if next 完整代码: 复制代码 代码如下: pageno=cint(currentPage) if cint(pageno)1 then lb=lba href=http://www.zzvips.com/list/list_theid_1.htm title=首页首页/a else lb=lba href=#首页/a end if if cint(pageno)1 and cint(pageno) then lb=lba href=http://www.zzvips.com/list/list_theid_pageno-1.htm title=上页上页/a else lb=lba href=#上页/a end if ps=cint(pageno)-2 if ps1 then ps=1 end if pe=clng(pageno)+5 if pempage then pe=mpage for i=ps to pe if i=pageno then lb=lbstrongi/strong else lb=lba href=http://www.zzvips.com/article//list/list_theid_i.htmi/a end if next if cint(pageno)mpage and mpage1 then lb=lba href=http://www.zzvips.com/list/list_theid_pageno+1.htm title=下页下页/a else lb=lba href=#下页/a end if if cint(pageno) mpage then lb=lba href=http://www.zzvips.com/list/list_theid_mpage.htm title=末页末页/a end if , targetpage) defaults if not isnumeric(adjacents) then adjacents = 1 end if if not isnumeric(limit) then limit = 15 end if if not isnumeric(page) then page = 1 end if if targetpage = then targetpage = / end if margin = padding= other vars prev = page - 1previous page is page - 1 nextPage = page + 1nextPage page is page + 1 lastpage = Ceil(totalitems , totalitems, adjacents。
正好研究并分享下,而此刻较量风行的是数字分页在中间, pagination.asp?foo=bar) Response.Write(br /br /br /br /br /br /br /br /ps) % 完整打包代码: pagination.rar 看了有些头晕, limit。
都是以前较量风行的, limit)lastpage is = total items / items per page,。
相关热词:
本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!
本文地址: https://v30.fanwenzhu.com/jiaob/asp/12782.shtml
相关文章
热门TAG
win10 ecshop 主机 阿里云 解决 配置 C# C++ 解析 SQL语句 命令 Go语言 方法 CSS3 HTML5 CSS win7 MSSQL 服务器配置 IIS7.5 IIS7 IIS6 IIS CentOS 7 Linux oracle数据库 oracle phpcms discuz discuz教程最新文章
-
所有我们手工回收一下就
时间:2021-01-18
-
最近网站改版正好发现原
时间:2021-01-17
-
现在完全支持ACCESS
时间:2021-01-17
-
出现错误的时候
时间:2021-01-13
-
ASP常见错误详解及解决方
时间:2021-01-05
-
查看ASP详细错误提示信息
时间:2021-01-05
-
4款傻瓜型的ASP服务器软件
时间:2020-12-23
-
ASP 数字分页效果代码
时间:2020-12-23
热门文章
-
出现错误的时候
时间:2021-01-13
-
查看ASP详细错误提示信息的图文设置方法
时间:2021-01-05
-
所有我们手工回收一下就可以了
时间:2021-01-18
-
one.asp多项目、函数库、类库 统一为一个
时间:2020-12-23
-
ASP下通过Adodb.Stream实现多线程下载大文件
时间:2020-12-23
-
asp在iis7报错行号不准问题的解决方法
时间:2020-12-23
-
4款傻瓜型的ASP服务器软件(asp运行环境一
时间:2020-12-23
-
最近网站改版正好发现原来的分页不带数
时间:2021-01-17
-
ASP和PHP文件操作速度的对比
时间:2020-12-23
-
现在完全支持ACCESS
时间:2021-01-17
