求救----页面跳转问题

tyx214586 2006-03-14 04:43:09

<%


if(request("kind")="") then
kind=0
else
kind=request("kind")
end if


callname=getcallname(kind)
sql="select * from call_board where kind="&kind&" order by createtime desc"
rs.open sql,conn,1,1

sz=20
rs.pagesize=sz
totalpage=cint(rs.recordcount\sz)
if rs.recordcount mod sz >0 then totalpage=totalpage+1
page=request("page1")
if page< "1" or page= "" then
page=1
else
page=cint(page)
'response.Write(page)
end if
if not rs.eof then rs.AbsolutePage=page
%>

<form name="form" method="post" action="">
<%if Page>1 then%>
<a href = ?page=<%=page-1%>&kind=<%=kind%>>上一页</a>
<%Else%>
上一页
<%End IF%>
|
<%if Page<totalpage then%>
<a href = ?page=<%=page+1%>&kind=<%=kind%>>下一页</a>
<%Else%>
<font style='color:#999999'>下一页</font>
<%End IF%><%=cint(page)%>/<%=Rs.pagecount%>页 共<%=Rs.recordcount%>个
跳转到 
<input type=text name="page" id="page" size=4 maxlength=5 >
 
<input type="submit" name="submit" value="go" onclike='javascript:Juge(page.value);'>
</form>

开始点GO能实现跳转,但是在点击下一页或者上一页的时候。。就不能在实现跳转了。
...全文
148 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
三仙半 2006-03-15
  • 打赏
  • 举报
回复
你把建立数据集的语句改成rs.open sql,conn,1,3,然后用rs.pagesize /rs.absolutePosition /abosolutepage这些属性进行分页,不更舒服一些吗?
ybfqlyq 2006-03-15
  • 打赏
  • 举报
回复
KIND這個條件你沒有傳遞過去了。。所以後面的下一頁就沒有這個參數了。。
在表單裡加個隱藏參數吧
<input type=hidden name="kind" id="page" value='<%=kind%>'>
ashen219 2006-03-14
  • 打赏
  • 举报
回复
试将<form action="" method="post">改为"get"看看怎样.
yeaky 2006-03-14
  • 打赏
  • 举报
回复
看看直接在网址上输入page=2之类的能不能转?
再看看正确第一页正确时的网址是多少 page=1???
比较一下,看看是不是输出网址时错了?

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧