var today = new Date(); function initArray() { this.length = initArray.arguments.length; for(var i=0; i=7 && hours < 12) { str_1 = "#393'>上午好,"; str_3 = "祝您一天愉快!"; } else if(hours >= 12 && hours < 19) { str_1 = "#c30'>下午好,"; str_3 = "祝您工作顺利!"; } else if(hours <7 || hours >= 19) { str_1 = "#069'>晚上好,"; str_3 = "要注意休息噢!"; } str_2 += "今天是" str_2 += now.getYear() + "年"; str_2 += now.getMonth() +1 + "月"; str_2 += now.getDate() + "日"; str_2 += d[today.getDay()+1] + ","; return(str_0 + str_1 + str_2 + str_3 + str_4); }