var s=new Date();
var n=(["星期日","星期一","星期二","星期三","星期四","星期五","星期六",]);
document.write("今天是"+s.getFullYear()+"年"+s.getMonth()+"月"+s.getDay()+"日,"+n[s.getDay()]);
js中getMonth()获取的月份是0-11,所以加一就对了
(s.getMonth() + 1) + "月" +
“日”是s.getDate(),你写错了