JavaScript内置对象Date,日期
var date = new Date();
var day = date.getDay();
if(day==0)
{
day="日";
}
document.writeln("现在时间:"+(date.getYear()+1900)+"年"+(date.getMonth()+1)+
"月"+date.getDate()+"日"+"星期"+day+":"+date.getHours()+"时"
+date.getMinutes()+"分"+date.getSeconds()+"秒");