:)
<!--提示时间代码开始-->
<script language=JavaScript><!---
today=new Date();
var hours = today.getHours();
var minutes = today.getMinutes();
var seconds = today.getSeconds();
var timeValue = "<FONT COLOR=black>" + ((hours >12) ? hours -12 :hours); timeValue += ((minutes < 10) ? "<BLINK><FONT COLOR=black>:</FONT></BLINK>0" : "<BLINK><FONT COLOR=black>:</FONT></BLINK>") + minutes+"</FONT></FONT>";
function initArray(){
this.length=initArray.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=initArray.arguments }
var d=new initArray("<font color=black>星期日","<font color=black>星期一","<font color=black>星期二","<font color=black>星期三","<font color=black>星期四","<font color=black>星期五","<font color=GREEN>星期六");
document.write(today.getYear(),"<font color=black>年","<font color=black>",today.getMonth()+1,"<font color=black>月","<font color=black>",today.getDate(),"<font color=black>日 </FONT>",d[today.getDay()+1]," ",timeValue);
var mess1="";
document.write("<font color=red>")
day = new Date( )
hr = day.getHours( )
if (( hr >= 0 ) && (hr <= 4 ))
mess1= " 后半夜了!您还不睡觉?"
if (( hr >= 4 ) && (hr < 7))
mess1=" 嗨,早上好!是一晚没睡还是早起来啊?"
if (( hr >= 7 ) && (hr < 12))
mess1=" 上午好!"
if (( hr >= 12) && (hr <= 18))
mess1= " 下午好!"
if ((hr >= 18) && (hr <= 23))
mess1= " 朋友晚上好,今天过得开心吗?"
document.write("<blink>")
document.write("<br>",mess1)
document.write("</blink>")
document.write("</font>")
//--></script>
<!--提示时间代码结束-->
温馨提示时间代码加在论坛首页的适当位置,显示的时间是访问者打开论坛的那一时刻.感觉真是温馨!
演示:
http://www.lmmml.com |