<font class="font12D">首篇:<%=nextnew(id,3)%> 上一篇:<%=nextnew(id,1)%> 下一篇:<%=nextnew(id,2)%> 尾篇 <%=nextnew(id,4)%></font> <% function nextnew(id2,o) if o=1then sql="select top 1 * from news where id>"&id2&" order by id" endif if o=2then sql="select top 1 * from news where id<"&id2&" order by id desc" endif if o=3then sql="select top 1 * from news" endif if o=4then sql="select top 1 * from news order by id desc" endif set rss=conn.execute(sql) if rss.eof then response.Write("没有了") else response.Write("<a href=syjwread.asp?id="&rss("id")&">"&rss("newsname")&"</a>") endif end function %>