一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

分页函数

时间:2022-06-30 10:22:30 编辑:袖梨 来源:一聚教程网

函数如下:
<%
private function fenye(rs, pagesize,args)
Dim intcur
Dim intpagesize
Dim total
Dim inttotal
args = split(args,",")
if Request.querystring("page")="" then
intcur=1
page = "first"
else
select case request("page")
case "first"
intcur=1
case "previous"
intcur=cint(request("curpage"))
intcur=intcur-1
case "next"
intcur=cint(request("curpage"))
intcur=intcur+1
case "last"
intcur=cint(request("lastpage"))
case else
intcur=request("page")
end select
end if
%>



<%
if rs.eof then
response.write "没有栏目:("
else
intpagesize=pagesize
rs.pagesize=intpagesize
if not rs.eof then
rs.AbsolutePage=intcur
end if
total=rs.recordcount
inttotal=rs.pagecount
Dim i
i = 0
%>



<%
Dim n
n = 0
do while n <= UBound(args)%>

<%
n = n + 1
loop
%>

<%
do while NOT rs.EOF and i

<%
Dim l
l = 0

<%response.write args(n)%>