[求助]分页显示 下一页 上一页 最后页
<%set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("lesson.mdb")
exec="select * from movie "
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
if not rs.bof and not rs.eof then
dim page_size,page_no,page_total
page_size=5
if request.querystring("page_no")="" then
page_no=1
else
page_no=cint(request.querystring("page_no"))
end if
rs.pagesize=page_size
page_total=rs.pagecount
rs.absolutepage=page_no
%>
<%
dim i
i=page_size
do while not rs.eof and i>0
i=i-1
response.write rs("movie_name")&"<br>"
rs.movenext
loop
response.write"请选数据页"
for i=1 to page_total
if i=page_no then
response.write I&"&nbsp"
else
response.write "<a href='list.asp?page_no="&i&"'>"&i&"</a>&nbsp"
end if
next
else
response.write "没有记录"
end if
%>
<br>
<a href="list.asp?page_no=1">首页</a>
哪位大哥 帮我把下一页 上一页 最后一页 跳转 的代码完成
[此贴子已经被作者于2005-10-1 18:01:07编辑过]