function showTime() {
var day = new Date();
var year = day.getFullYear();
var month = day.getMonth() + 1;
var date = day.getDate();
var days = day.getDay();
var hours = day.getHours();
var minutes = day.getMinutes();
var second = day.getSeconds();
switch (days) {
case 1:
rs = '一';
break;
case 2:
rs = '二';
break;
case 3:
rs = '三';
break;
case 4:
rs = '四';
break;
case 5:
rs = '五';
break;
case 6:
rs = '六';
break;
case 7:
rs = '日';
break;
}
document.getElementById("nine").innerHTML = '今天是' + year + '年' + month + '月' + date + '日' + '星期' + rs
+ hours + '时' + minutes + '分' + second + '秒'
}
window.onload = showTime