发布网友 发布时间:2022-04-22 00:37
共2个回答
热心网友 时间:2022-04-08 22:36
document.write('<table width="100%" height="20" border="0" cellspacing="1" cellpadding="1"><TR><TD height="20"> <%if data>=date() then Response.Write("·") else Response.Write("·") end if%> <%if i=true then Response.Write("<font color=#0099CC>[图文]</font>")%><A HREF=http://www.detang.com/news/detail.asp?n_id=<%=id%> title="<%=title%> (<%=hit%>次) " target="_blank"><%if len(title)>max then%><%if DateDiff("d",data,now())<3 then%><font color=red><%=left(title,max)%></font><%else%><%=left(title,max)%><%end if%><%else%><%if DateDiff("d",data,now())<3 then%><font color=red><%=title%></font><%else%><%=title%><%end if%><%end if%></a><%if com=true then Response.Write("<font color=#0099CC>[推]</font>")%><%if DateDiff("d",data,now())<3 then Response.Write("<image src=images/new.gif>")end if%></TD></TR></table>');
其中if DateDiff("d",data,now())<3 then 表示现在时间和新闻发布时间的差值,如小于3天标题就标红
热心网友 时间:2022-04-08 23:54
if datediff("d",now(),你的时间)>-3 then
response.write "<font color='red'>"&你的时间&"</font>"
else
response.write "<font color='#000000'>"&你的时间&"</font>"
end if
时间是用“/”分割。可以是使用replace来替换)
replace(timer,"-","/"))