定时问候代码
标签:代码
显示效果
清新问候:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 清新问候:<script language="javascript"> <!-- d = new Date(); hours = d.getHours(); if(hours == 1)msg = "如果还在听音乐,请把声音调小点,不要打扰别人"; if(hours == 2)msg = "如果还在听音乐,请把声音调小点,不要打扰别人"; if(hours == 3)msg = "如果还在听音乐,请把声音调小点,不要打扰别人"; if(hours == 4)msg = "如果还在听音乐,请把声音调小点,不要打扰别人"; if(hours == 5)msg = "如果还在听音乐,请把声音调小点,不要打扰别人"; if(hours == 6)msg = "如果还在听音乐,请把声音调小点,不要打扰别人"; if(hours == 7)msg = "清晨,何不呼吸下新鲜的空气"; if(hours == 8)msg = "早上,计划好了干什么了吗?来点音乐如何?"; if(hours == 9)msg = "早上,计划好了干什么了吗?或者看看一些新闻呢?"; if(hours == 10)msg = "响午,肚子开始叫了吗?你应该听听些舒缓的音乐了"; if(hours == 11)msg = "响午,肚子开始叫了吗?你应该听听些舒缓的音乐了"; if(hours == 12)msg = "中午,肚子饿了吗?该去找点东西垫垫肚子了"; if(hours == 14)msg = "午后,休息好了吧!听听歌放松下"; if(hours == 15)msg = "下午,来听听音乐,放松心情"; if(hours == 16)msg = "下午,来听听音乐,放松心情"; if(hours == 17)msg = "下午,来听听音乐,放松心情"; if(hours == 18)msg = "傍晚,该去吃点东西了吧!"; if(hours == 19)msg = "是夜,听歌的时候"; if(hours == 20)msg = "是夜,听歌的时候"; if(hours == 21)msg = "是夜,听歌的时候"; if(hours == 22)msg = "晚上十点喽,准备睡觉了吗?听听音乐催下眠吧!"; if(hours == 23)msg = "不早了,该休息了"; if(hours == 24)msg = "再不休息,明天就没有精神了"; document.write(msg); //--> </script> |