搜索
查看: 10337|回复: 4

ASP上一页 下一页代码

[复制链接]
发表于 2010-1-8 19:24:30 | 显示全部楼层 |阅读模式

产品展示:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td><%qid=request.QueryString("id")
         'response.write qid
         set rs1=Server.CreateObject("ADODB.Recordset")
sql1="select top 1 * from xld_product where pro_id="& qid-1 &""
'response.Write(sql1)
rs1.open sql1,conn,1,1
if rs1.eof and rs1.bof then
%>
                                    <div align="center">&nbsp;上一个:暂时没有</div>
                                  <%else%>
                                    <div align="center">&nbsp;上一个:<a title="<%=rs1("pro_title")%>" href="zp_view.asp?id=<%=rs1("Pro_id")%>"><%=rs1("pro_title")%></a></div>
                                  <%end if%></td>
                                <td><%
set rs2=Server.CreateObject("ADODB.Recordset")
sql2="select top 1 * from xld_product where pro_id>"& qid &" order by pro_id asc"
'response.Write(sql2)
rs2.open sql2,conn,1,1
if rs2.eof and rs2.bof then

- G2 p/ E8 v+ }* G5 @& z( ?3 K

%>
                                    <div align="center">&nbsp;&nbsp;下一个:暂时没有</div>
                                  <%else%>
                                    <div align="center">&nbsp;&nbsp;下一个:<a title="<%=rs2("pro_title")%>" href="zp_view.asp?id=<%=rs2("pro_id")%>"><%=rs2("pro_title")%></a></div>
                                  <%end if%></td>
                              </tr>
                            </table>

( `4 W% y3 s0 ~( t- F8 b: Y, v. ~

$ X' f. |2 V; p$ H9 \

- B7 h$ p/ R2 {. v9 S


新闻页面:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td><%qid=request.QueryString("id")
        
         'response.Write(hddido)
set rs1=Server.CreateObject("ADODB.Recordset")
sql1="select * from xld_news where news_id="& qid-1 &""
rs1.open sql1,conn,1,1
if rs1.eof and rs1.bof then
%>
                                    <div align="center">&nbsp;上一篇文章:暂时没有</div>
                                  <%else%>
                                    <div align="center">&nbsp;上一篇文章:<a title="<%=rs1("news_title")%>" href="view.asp?id=<%=rs1("news_id")%>"><%=rs1("news_title")%></a></div>
                                  <%end if%></td>
                                <td><%
set rs2=Server.CreateObject("ADODB.Recordset")
sql2="select * from xld_news where news_id>"&qid&""
rs2.open sql2,conn,1,1
if rs2.eof and rs2.bof then
%>
                                    <div align="center">&nbsp;&nbsp;下一篇文章:暂时没有</div>
                                  <%else%>
                                    <div align="center">&nbsp;&nbsp;下一篇文章:<a title="<%=rs2("news_title")%>" href="view.asp?id=<%=rs2("news_id")%>"><%=rs2("news_title")%></a></div>
                                  <%end if%></td>
                              </tr>
                            </table>

回复

使用道具 举报

发表于 2010-1-28 20:40:00 | 显示全部楼层
好。。。。支持一下
发表于 2010-3-12 01:53:45 | 显示全部楼层
ssssssssssssssssssss
发表于 2010-3-25 10:00:52 | 显示全部楼层
ssssssssssssssssssss
发表于 2010-3-26 18:22:37 | 显示全部楼层
3333333333333333
您需要登录后才可以回帖 登录 | 注册帐号

本版积分规则

热议作品
精华帖子排行
精彩推荐

虾皮社区,成立十年了!

站长自己也搞不懂想做个什么,反正就是一直在努力的做!

Copyright © 2007-2019 xp6.org Powered by Discuz

QQ|Archiver|手机版|小黑屋|虾皮社区 鲁公网安备 37021102000261号 |网站地图
返回顶部 返回列表