日期:2014-05-16 浏览次数:20442 次
var dt = new Date();
var str="今天是:";
str+=dt.getYear()+"年";
str+=(dt.getMonth()+1)+"月";
str+=dt.getDate()+"日";
str+=dt.getHours()+":";
str+=dt.getMinutes()+":";
str+=dt.getSeconds()+="星期";
switch(dt.getDay()){
case 0:str+="日";
break;
case 1:str+="一";
break;
case 2:str+="二";
break;
case 3:str+="三";
break;
case 4:str+="四";
break;
case 5:str+="五";
break;
case 6:str+="六";
break;
}
document.write(str);