关于替换 /

var time = 2019/08/29 12:00:00

time = time.replace(/\//g, '-');

console.log(time)          //  输出值为 2019-08-29 12:00:00

发布了17 篇原创文章 · 获赞 1 · 访问量 1698

猜你喜欢

转载自blog.csdn.net/weixin_43817724/article/details/100141045