标题:实现上一篇和下篇ASP代码
取消只看楼主
angerzl
Rank: 1
等 级:新手上路
帖 子:122
专家分:0
注 册:2007-8-20
结帖率:100%
 问题点数:0 回复次数:0 
实现上一篇和下篇ASP代码
<%rs.close
set rs=server.createobject("adodb.recordset")
sql="select * from news where id="&request("id")-1
rs.open sql,conn,1,1
  if rs.eof and rs.bof then
%>
                    <span class="STYLE10">上篇文章:</span>已经没有了
                    <%else%>
                    <br>
                    <span class="STYLE10">上篇文章:</span><a href="shownews.asp?id=<%=rs("id")%>"><%=rs("title")%></a>
                    <%end if%>
                    <BR>
                    <% rs.close
set rs=server.createobject("adodb.recordset")
sql="select * from news where id="&request("id")+1
rs.open sql,conn,1,1
  if rs.eof and rs.bof then
 %>
                    <span class="STYLE10">下篇文章:</span>已经没有了
                    <%else%>
                    <span class="STYLE10">下篇文章:</span><a href="shownews.asp?id=<%=rs("id")%>"><%=rs("title")%></a>
                    <%end if%>
搜索更多相关主题的帖子: 下篇 ASP 代码 
2007-12-21 09:48



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-193622-1-1.html




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

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