帮忙看下代码,什么都不显示
var d=new Date();
var weekday=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
document.write(d.getFullYear()+"年");
document.write(d.getMonth()+1+"月");
document.write(d.getDate()+"日"+" ");
document.write(weekday[d.getDay()]+"--班级平均分为");
在var d=new Date();这句前面加alert语句都没反应,是怎么回事呢?