以下代码直接复制即可使用。
1 A7 W- H5 A1 V B4 n: R<%dim newsid newsid=Request("showid") 5 l! `4 J; @$ g. Q; s+ p8 f
sql="select top 1 title,id from cnnew where id<"&newsid&" order by id desc" set rsnews=conn.execute(sql) if rsnews.eof then response.write "上一篇文章: 已经是首篇文章了" else response.write "上一篇文章: <a href=news-cn.asp?showid="&rsnews("id")&">"&rsnews("title")&"</a>" end if response.Write"<p>" sql="select top 1 title,id from cnnew where id>"&newsid&" order by id" set rsnews=conn.execute(sql) if rsnews.eof then response.write "下一篇文章: 请等待更新" else response.write "下一篇文章: <a href=news-cn.asp?showid="&rsnews("id")&">"&rsnews("title")&"</a>" end if
+ y- W2 ~3 F% Y k1 k%>
7 }2 T4 _2 @# X& O; z3 ~$ v- I e
% n6 i o% m2 Y- A[此贴子已经被作者于2012-8-8 15:23:51编辑过]
) w% b& M# s8 T- V |