JS 格式化时间字符串:自动补零 admin2022/08/14 10:28:49 >'2012-2-1'.replace(/(\D)(\d)\b/g, '$10$2')<"2012-02-01">'2012-2-15'.replace(/(\D)(\d)\b/g, '$10$2')<"2012-02-15"简单、快捷 进入原文参与互动