小鸚鵡飛飛謝謝大家常來喔!喜歡的文章別忘記推薦上痞客專欄喔!小鸚飛飛圖文與照片請勿轉載喔!謝謝合作!
此為JAVA的語法~無名不適用喔!~
喜歡就搬家吧^^

自己設定每小時要說的話
時間一到問候語就會變喔^^
很貼心吧^^

語法如下~

<script language=JavaScript>
var today = new Date ();var hours = today.getHours();
document.write( "<font color=#000000 face='新細明體' size='2'>");
if (hours <=0) document.write("要打的字");
else if (hours <= 1) document.write("要打的字");
else if (hours <= 2) document.write("要打的字");
else if (hours <= 3) document.write("要打的字");
else if (hours <= 4) document.write("要打的字");
else if (hours <= 5) document.write("要打的字");
else if (hours <= 6) document.write("要打的字");
else if (hours <= 7) document.write("要打的字");
else if (hours <= 8) document.write("要打的字");
else if (hours <= 9) document.write("要打的字");
else if (hours <= 10) document.write("要打的字");
else if (hours <= 11) document.write("要打的字");
else if (hours <= 12) document.write("要打的字");
else if (hours <= 13) document.write("要打的字");
else if (hours <= 14) document.write("要打的字");
else if (hours <= 15) document.write("要打的字");
else if (hours <= 16) document.write("要打的字");
else if (hours <= 17) document.write("要打的字");
else if (hours <= 18) document.write("要打的字");
else if (hours <= 19) document.write("要打的字");
else if (hours <= 20) document.write("要打的字");
else if (hours <= 21) document.write("要打的字");
else if (hours <= 22) document.write("要打的字");
else if (hours <= 23) document.write("要打的字");
</script>


說明:
1.document.write( "<font color=#000000(字的顏色) face='新細明體' (字型)size='2'(字的大小)>")
2.if (hours <=0) document.write("要打的字");-->為凌晨12點到1點
   else if (hours <= 1) document.write("要打的字");-->為凌晨1點到2點
    else if (hours <= 2) document.write("要打的字");-->為2點到3點
     ...........以此類推喔!!~
喜歡嗎?帶回去記得回應一下喔!你的回應是對我的鼓勵喔!^^

Posted by mimiwawa at 痞客邦 PIXNET Comments(1) Trackback(0) Hits(202)


open trackbacks list Trackbacks (0)

Comments (1)

Post Comment
  • 打包帶走
  • OK!謝謝告知!

    mimiwawareplied on 2008/10/27 09:41

Comment Permissions: Allow commenting

Leave Comment

*Name/Nickname
E-mail
Personal Website
Comment Title
*Comment
* Private Comment