将2018-12-25转化成2018/12/25 jiezi 6 年前 var today = “2018-12-25”;var reg = new RegExp(‘-‘ , “g”)var newstr = today.replace(reg , ‘/’);