admin 管理员组

文章数量: 886992

js获得日期格式为 xxxx

js获得日期格式为 xxxx-xx-xx xx:xx
let now = new Date()
let nowStr = now.getFullYear() + "-"+ (now.getMonth() + 1 < 10 ? "0" + (now.getMonth() + 1) : now.getMonth() + 1) + "-"+ (now.getDate() < 10 ? "0" + now.getDate() : now.getDate()) + " "+ (now.getHours() < 10 ? "0" + now.getHours() : now.getHours()) + ":"+ (now.getMinutes() < 10 ? "0" + now.getMinutes() : now.getMinutes())

本文标签: js获得日期格式为 xxxx