标签:
var week;
if(new Date().getDay()==0) week="星期日"
if(new Date().getDay()==1) week="星期一"
if(new Date().getDay()==2) week="星期二"
if(new Date().getDay()==3) week="星期三"
if(new Date().getDay()==4) week="星期四"
if(new Date().getDay()==5) week="星期五"
if(new Date().getDay()==6) week="星期六"
document.write("现在是" + new Date().getFullYear() + "年" + (new Date().getMonth() + 1) + "月" + new Date().getDate() + "日 " + week);
document.write(" ")
day = new Date()
hr = day.getHours()
minu=day.getMinutes()
s="";
s=s+hr+"点"+minu+"分! ";
if (hr ==1)
document.write(s+"一点多啦!别忘了休息哦!")
if (hr ==2)
document.write(s+"你真是工作狂啊,该休息了!")
if (hr ==3)
document.write(s+"午夜三点!你还不准备睡觉吗?")
if (hr ==4)
document.write(s+"凌晨四点多了,很敬重您这种忘我的工作精神!")
if (hr ==5)
document.write(s+"您是刚起床还是还没睡啊?")
if (hr ==6)
document.write(s+"早上好!新一天又开始啦!有什么打算呢?")
if (hr ==7)
document.write(s+"吃过早饭了吗?不要空腹哦!")
if ((hr ==8) || (hr == 9) || (hr ==10))
document.write(s+"早上好!忙碌的一天开始了!")
if (hr ==11)
document.write(s+"快中午啦,准备吃饭了呀!")
if (hr ==12)
document.write(s+"中午好!你吃饭了吗?")
if ((hr==13) || (hr==14))
document.write(s+"下午好,准备准备要上班了!")
if ((hr==15) || (hr==16) || (hr==17))
document.write(s+"下午好!今天都做了些什么啊?")
if ((hr==18) || (hr==19))
document.write(s+"新闻联播你看了吗?吃晚饭了没?")
if ((hr==20) || (hr==21) || (hr==22))
document.write(s+"别工作了,找个电影看看睡觉吧?")
if (hr==23)
document.write(s+"不早了,快休息吧?")
if (hr==0)
document.write(s+"午夜时分,你可要注意身体呢!")
document.write("")
标签:
原文地址:http://www.cnblogs.com/jingyong001/p/5082073.html