qq_颖心晴_04387028
2017-02-28 22:09
var mydate=new Date();
var weekday=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
var mynum=mydate.getDay();
document.write(mydate.getFullYear()+"年"+mydate.getMonth()+"月"+mydate.getDate()+"日"+weekday(mynum));
document.write(mydate.getFullYear()+"年"+mydate.getMonth()+"月"+mydate.getDate()+"日"+weekday(mynum)); //weekday[mynum],要用中括号不是小括号
可以了,谢谢
JavaScript进阶篇
468060 学习 · 21891 问题
相似问题