以下代码直接复制即可使用。 0 p6 H3 I. d* I6 I
<%dim newsid newsid=Request("showid") ' b/ W& w5 y. u7 N5 B. i2 P
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
: p8 R9 m+ `" t: w9 g%>
) C! n5 B0 Z# j! @2 V: L6 b5 I) t $ F: ?: B. u8 E4 v; u
[此贴子已经被作者于2012-8-8 15:23:51编辑过] 1 H9 D/ A* `4 ^" Q
|