数据库的表中一定要有时间的字段(AddDate),才能判断所增加的新闻信息是否属最新的。
以下试试看:
<td width="41%" style='BORDER-bottom: #999999 1px dotted'><font color="#999999" >[<%=rs_news("AddDate")%>]</font><%if DateValue(rs("AddDate"))=>DateValue(date()-2) then
Response.Write "<font color=red>new</font>"%><%end if%></td>
或者:
<td width="41%" style='BORDER-bottom: #999999 1px dotted'><font color="#999999" >[<%=rs_news("AddDate")%>]</font><%if DateValue(rs("AddDate"))=date() then%>
<font color=red>new</font><%end if%></td>
[此贴子已经被作者于2007-9-29 13:01:57编辑过]