迷茫2017-04-11 10:50:11
首先你得确认你这段代码执行了没。这句写的不对,
var dy = new Array["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
把new Array去掉。
var dy = ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
阿神2017-04-11 10:50:11
var date = new Date();
var day = ['日','一','二','三','四','五','六'];
var strArr = [
date.getFullYear()+'年',
(date.getMonth()+101+'').substring(1)+'月',
(date.getDate()+100+'').substring(1)+'日'
];
strArr.join('') + ' 星期' + day[date.getDay()];
//2016年06月01日 星期三