var weekDay = ["星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]; var myDate = new Date(Date.parse("2018/5/19")); console.log(weekDay[myDate.getDay()]); // 星期六
var weekDay = ["星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]; var myDate = new Date(Date.parse("2018/5/19")); console.log(weekDay[myDate.getDay()]); // 星期六