?? 55.html
字號:
<html>
<head>
<title>不同時間段的問候信息</title>
</head>
<body>
<script language="JavaScript">
document.write("<table bgcolor=00FF00>"+"<font size=2 color=0000FF><br>")
var now=new Date()
var hr
hr=now.getHours()
if (hr==0)
{document.write("午夜 12 點多了,晚安!明天早些起床哦!!")}
if (hr==1)
{document.write("嗯!午夜 1 點多了,還在干什么啊?")}
if (hr==2)
{document.write("午夜 2 點多了,是不是該睡覺了?")}
if (hr==3)
{document.write("已經午夜 3 點多了,還不睡!小心變熊貓!")}
if (hr==4)
{document.write("呵!凌晨 4 點了!您是一夜未睡還是剛起床呀?")}
if (hr==5)
{document.write("早安啊!清晨 5 點了!您這么早起床有事嗎?")}
if (hr==6)
{document.write("早安!清晨 6 點了!您已經準備要刷牙洗臉了?")}
if (hr==7)
{document.write("早啊! 早上 7 點了!您準備要去上班或上課了嗎?")}
if (hr==8)
{document.write("OH!早上 8 點了!早餐吃了沒呀?已經開始上班了嗎?")}
if (hr==9)
{document.write("早上 9 點了!嘿嘿嘿!這時上網好像快一點喔!")}
if (hr==10)
{document.write("現在是上午 10 點了!悃嗎?")}
if (hr==11)
{document.write("上午 11 點了!肚子餓了吧 , 再忍耐一下,就快午休了")}
if (hr==12)
{document.write("午安!中午 12 點了!吃飯去吧!")}
if (hr==13)
{document.write("現在在是下午 1 點了!想不想要睡個午覺呀?")}
if (hr==14)
{document.write("下午 2 點了!不要邊打瞌睡邊流口水哦!")}
if (hr==15)
{document.write("哈!下午 3 點了!剛上班嗎?")}
if (hr==16)
{document.write("下午 4 點了!再忍一下...就快下班了!")}
if (hr==17)
{document.write("下午 5 點!準備好下班了嗎?")}
if (hr==18)
{document.write("已經傍晚 6 點了!先去吃個飯吧!")}
if (hr==19)
{document.write("晚上 7 點了!吃飯了嗎?不要虐待自己喔!")}
if (hr==20)
{document.write("晚安!現在是 8 點了!看完新聞,看看書吧?")}
if (hr==21)
{document.write("嗨!晚上 9 點了!上網的好時光!")}
if (hr==22)
{document.write("嗯!現在是晚上 10 點了!在做什么啦?")}
if (hr==23)
{document.write("哇!已經晚上 11 點多了!又是一天過去了,準備上床睡覺了!")}
document.write("</font></font></table></center>")
</script>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -