大神求解啊
var myDate = new Date();
var weekDays = ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]
document.write(myDate.getFullYear() + "年" + myDate.setMonth(5) + "月" + myDate.getDay() + "日" + weekDays[myDate.getDay()]);
</script>
这串代码中为什么输出的月份是一串数字呢?
var myDate = new Date();
var weekDays = ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]
document.write(myDate.getFullYear() + "年" + myDate.setMonth(5) + "月" + myDate.getDay() + "日" + weekDays[myDate.getDay()]);
</script>
这串代码中为什么输出的月份是一串数字呢?
2017-06-09
举报