var day2 = new Date(); day2.setTime(day2.getTime()); var date = day2.getFullYear()+"-" + (day2.getMonth()+1) + "-" + day2.getDate(); var dt = new Date(date.split("-")[0], date.split("-")[1]-1,date = date.split("-")[2]); var weekDay = ["星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]; console.log(weekDay[dt.getDay()],'打印是星期四')