请问我这段代码哪里错了呀 ?为何无法显示结果
var mydate=new Date();
var year=mydate.getFullYear();
var month=mydate.getMonth()+1;
var date=mydate.getDate();
var day=myweek[mydate.getDay()]
var myweek=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]
document.write(year+"年"+month+"月"+date+"日"+day);