为什么我的跳转不好用,我不知道哪错了。请大家帮我看一下。谢谢啦!
<%
page1 = request.QueryString("page")
id1 = request.QueryString("id")
if not isempty(request.QueryString("page")) then
dpage = cint(request.QueryString("page"))
else
'如果dpage没有值,就给dpage初始化 值为1
dpage = 1
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from classII where id=" & request("id") ,conn,1,1
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select * from product where id=" & request("id") ,conn,1,1
dim dl
dl=rs("classname")
rs.close
rs.open "select * from Product where classII =" & request("id"),conn,1,1
%>
<%
if rs.eof and rs.bof then
page=1
maxpage=1
else
rs.pagesize=3
icount=rs.recordcount
ipagesize=rs.pagesize
maxpage=rs.pagecount
page=request("page")
if not isnumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs.absolutepage=page
if page=maxpage then
x=iconut-(maxpage-1)*ipagesize
else
x=ipagesize
end if
x=x-4
if page<>1 then
for i=0 to x
rs.movenext
next
end if
end if
%>
<%
dim x
x=0
do while not rs.eof
%>
循环
<%
x=x+1
if x>2 then exit do
rs.movenext
loop%>
<%
response.Write"共"&rs.recordcount&"条记录"
%>
共<%=maxpage%>页 第<%=page%>页
<%
if page=1 then
response.Write"[上一页]"
else
%>
[<a href="?page=<%=page-1%>&id=<%=id1%>">上一页</a>]
<%
end if
if page=rs.pagecount or page=0 then
response.Write"[下一页]"
else
%>
[<a href="lxzm1.asp?page=<%=page+1%>&id=<%=id1%>"> 下一页</a>]
<%
end if
if page>1 then
%>
[<a href=lxzm1.asp?pag=1&id=<%=id1%>>首页</a>]
<%
else
response.Write"[首页]"
end if
if page<rs.pagecount then
%>
[<a href=lxzm1.asp?page=<%=int(rs.pagecount)%>&id=<%=id1%>>尾页</a>]
<%
else
response.Write"[尾页]"
end if
%>
转到第
<select name="sel_page" onchange="javascript:location=this.options[this.selectedIndex].value;">
<%
for i = 1 to rs.PageCount
if i = page then%>
<option value="lxzm1.asp?page=<%=i%>" selected><%=i%></option>
<%else%>
<option value="lxzm1.asp?page=<%=i%>"><%=i%></option>
<%
end if
next
%>
</select>页