在涉及到日期的一下地方需要将’/‘符号与’-'符号来回替换,
'/‘符号替换为’-'符号:
var date = new Date();
console.log(date.toLocaleDateString().replace(/\//g, "-"));
在涉及到日期的一下地方需要将’/‘符号与’-'符号来回替换,
'/‘符号替换为’-'符号:
var date = new Date();
console.log(date.toLocaleDateString().replace(/\//g, "-"));