话不多说看代码 let date = new Date(); let day = '星期'+'日一二三四五六'.charAt(date.getDay());//用字符串下标获取对应字符串 console.log(day); //星期一