| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 437 人关注过本帖
标题:看一下分页跳转的时候出问题
只看楼主 加入收藏
s6gy
Rank: 1
等 级:新手上路
帖 子:330
专家分:0
注 册:2006-10-26
收藏
 问题点数:0 回复次数:4 
看一下分页跳转的时候出问题
<table width="100%" border="0">
<tr>
<%
opendatabase()
set rs=Server.CreateObject("adodb.recordset")
sql="select * from news order by id desc"
Rs.Open sql,conn,1,3


If IsNumeric(Request("Page"))=false Or Request("Page")="" OR Request("Page")<1 Then
Page=1
Else

Page=CInt(Request("Page"))
End if
Rs.PageSize=12 '每页显示的帖子数
If Rs.EOF Or Rs.BOF Then
Response.Write "<td height=25 colspan='2'>没新闻!</td>"
Response.End
Else
myPageSize=Rs.PageSize
allpagecoun=rs.pagecount '获得页数
if page+1>=allpagecoun+1 then page=allpagecoun
if allpagecoun>0 then rs.AbsolutePage=page
Do While not Rs.Eof And myPageSize>0
%>
<td height="20" width="4"></td>
<td height="20" width="9"><img src="/img/do_01.gif" width="9" height="14"></td>
<td width="455"align="left" valign="bottom"><div align="left"><a href="view_news.asp?id=<%=rs("id")%>" class="news"><%=rs("title")%></a></div></td>
<td width="88">[<%=rs("time1")%>]</td>
</tr>

<tr>
<td height="4" width="4"></td>
<td height="4" colspan="3" background="/img/dot_bg.gif"></td>
</tr> <% myPageSize = myPageSize - 1
i = i+1
Rs.MoveNext
Loop
%>
</table>
<br>
<table width="560" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="407" height="25">  总页数:<%=rs.pagecount%>  当前第<span class="STYLE12"> <%=Page%></span> 页  <a href='news.asp?Page=1' title=''>首页</a> <a href='news.asp?Page=<%=Page-1%>' >上一页</a> <a href='news.asp?Page=<%=page+1%>' >下一页</a> <a href='news.asp?Page=<%=rs.PageCount%>' >最后一页</a>  </td>
<td width="38" valign="top">
<input type="image" src="../img/go.jpg" name="Submit" />

</td>
<td width="113" valign="top"><input name="page" type="text" class="inputbg1" value="1" size="3">
页</td>
</tr>
</table


现在的问题是跳转不起
只要http://mssql.jfb.sfsoft.cn/qt_jfb/news.asp?Page=2 地址是这样的都跳转不起
如果默认是0默认的话是 http://mssql.jfb.sfsoft.cn/qt_jfb/news.asp 的话就能跳转 但是上面不显示PAGE=对应的页书
搜索更多相关主题的帖子: Request false border 
2007-06-21 10:14
s6gy
Rank: 1
等 级:新手上路
帖 子:330
专家分:0
注 册:2006-10-26
收藏
得分:0 
ding shqu
2007-06-21 14:49
shdyh977
Rank: 1
等 级:新手上路
威 望:1
帖 子:109
专家分:0
注 册:2007-5-22
收藏
得分:0 
你&lt;form&gt;里的内容是传递变量到本业吗?
2007-06-21 14:52
s6gy
Rank: 1
等 级:新手上路
帖 子:330
专家分:0
注 册:2006-10-26
收藏
得分:0 

传到本页了的撒

2007-06-21 16:06
思绪
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2007-6-15
收藏
得分:0 

< br>
< form action="" method="post">
< table width="560" border="0" cellspacing="0" cellpadding="0">
............
< td width="113" valign="top">< input name="page" type="text" class="inputbg1" value="1" size="3">
页< /td>
< /tr>
< /table>
< /form>


2007-06-22 09:01
快速回复:看一下分页跳转的时候出问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015096 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved