
function Year_Month_day(){ 
    var now = new Date(); 
    var yy = now.getYear(); 
    var mm = now.getMonth()+1; 
    var dd = now.getDate();
    return( yy + '年' + mm + '月' + dd + '日'); 
} 

function Date_hello(){ 
    var now = new Date(); 
    var tipsword; 
    if (now.getHours() <= 12){ tipsword = '早上好!';} 
    else if ((now.getHours()) > 12 && (now.getHours()) < 18) {tipsword = '下午好!';} 
    else {tipsword = '晚上好!';}
    return(tipsword); 
} 

function Day_of_Today(){ 
    var day = new Array(); 
    day[0] = "星期日"; 
    day[1] = "星期一"; 
    day[2] = "星期二"; 
    day[3] = "星期三"; 
    day[4] = "星期四"; 
    day[5] = "星期五"; 
    day[6] = "星期六"; 
    var now = new Date();  
    return( day[now.getDay()]); 
} 


function refreshCalendarClock(){ 
document.all.calendarClock1.innerHTML = Year_Month_day(); 
document.all.calendarClock2.innerHTML = Day_of_Today(); 
document.all.calendarClock3.innerHTML = Date_hello();
} 

document.write('<font id="calendarClock1" class="black" > </font>&nbsp;&nbsp;');
document.write('<font id="calendarClock2" class="black"> </font>&nbsp;&nbsp;');
document.write('<font id="calendarClock3" class="black"> </font>&nbsp;&nbsp;');
document.write('<font id="calendarClock4" class="black"></font>');
setInterval('refreshCalendarClock()',1000);
