function getNowTimeStr() {var now = new Date();return now.toLocaleDateString().replace(/\//g, "-") + " " + now.toTimeString().substr(0, 8);}
时间:2018-11-20 13:13:21
function getNowTimeStr() {var now = new Date();return now.toLocaleDateString().replace(/\//g, "-") + " " + now.toTimeString().substr(0, 8);}
【JS】获取当前时间 且格式为yyyy-MM-dd hh:mm:ss
2022-02-07
JS获取当前时间并格式化“yyyy-MM-dd HH:mm:ss“
2023-10-23
js获取当前时间字符串 格式yyyy-MM-dd HH:MM:SS
2023-05-06