<%
dim db
set db=server.CreateObject("adodb.connection")
db.open "dbq="& server.MapPath("×.mdb")&";driver={microsoft access driver (*.mdb)}"
%>
分页技术:
dim page_size,page_total,page_num
page_size=10
if request("page_num")="" then
page_num=1
else
if isnumeric(request("page_num")) then
page_num=request("page_num")
else
response.Write("数据出错!请联系管理员!")
response.End()
end if
end if
rs.pagesize=page_size
page_total=rs.pagecount
rs.absolutepage=page_num
if cint(page_num)>cint(page_total) then
response.write"请联系管理员"
response.end()
end if
num=page_size
do while not rs.eof and num>0
num=num-1
%>...........................
<%
dim qianyiye,houyiye
if page_total=1 then
response.Write"第1/1页 "
else
if page_num=1 then
houyiye=page_num+1
%>
第1/<%=page_total%>页 <a href="bgrb.asp?page_num=<%=houyiye%>">后页</a> <a href="bgrb.asp?page_num=<%=page_total%>">末页</a>
<%
else
if cint(page_num)=cint(page_total) then
qianyiye=page_num-1
%>
第<%=page_total%>/<%=page_total%>页 <a href="bgrb.asp?page_num=1">首页</a> <a href="bgrb.asp?page_num=<%=qianyiye%>">前页</a>
<% else
qianyiye=page_num-1
houyiye=page_num+1
%>
第<%=page_num%>/<%=page_total%>页 <a href="bgrb.asp?page_num=1">首页</a> <a href="bgrb.asp?page_num=<%=qianyiye%>">前页</a> <a href="bgrb.asp?page_num=<%=houyiye%>">后页</a> <a href="bgrb.asp?page_num=<%=page_total%>">末页</a>
<%
end if
end if
end if
%>
中国足彩网信息请查看IT技术专栏
2025国考·省考课程试听报名