文章目录 分割Date元素成字符串 分割Date元素成字符串 let date = new Date(); dateStr = date.toISOString(); console.log(dateStr.split(/T|:|\-|./));