javastr="<style></style>" <!--#include file="articleconn.asp"--> <%newstype=request("typeid")'获得栏目编号 n=request("n")'获得选取的数据个数 '从数据库中按时间倒序选取已经审核通过的前n个文章 dddd = year(now()) & "-" & month(now()) & "-" & day(now()),取得目前的时间 sql1="select * from type where typeid="&cstr(newstype) set rs1=conn.execute(sql1) sql="select * from article where (shenghe=1 and typeid="&cstr(newstype)&") order by dateandtime desc" set rs=conn.execute(sql)%> <% if rs.eof and rs.bof then %> document.write ("暂时没有任何内容") <%else%> <% do while not rs.eof %> javastr=javastr+"<tr><td>" javastr=javastr+"<font color=\"#FF0000\">□</font><span style=\"font-size:9pt;line-height: 13pt\"><a href=\'<%=rs("path")%>/<%=rs("N_Fname")%>\') target=\"_blank\"><%=rs("title")%></span></a> <%if DateDiff("d",rs("dateandtime"),dddd)<2 then%><img src="soft/image/new.gif"><%end if%> <font color=\"#666666\" font size=\"1\">(<%=rs("dateandtime")%>)(<%=rs("hits")%>次)</font>" <%n=n-1 if n<1 then exit do rs.movenext loop %> javastr=javastr+" >>><a href=\'<%=rs1("typename")%>/<%=rs1("firstpage")%>'\)>更多内容</a><a href=\'<%=rs1("typename")%>/<%=rs1("firstpage")%>'\)></span></a></td></tr>" <%rs.close set rs=nothing conn.close set conn=nothing%> document.write (javastr) <%end if%> 只要加红色的就会显示不出来。