Js 替代时间:2023-03-08 17:12:16 替代全部:.replace(/#/g,"/") 替代第一个:.replace("#","/") var regS = new RegExp(keyWords, "g"); var reg = '<i style="color:red">' + keyWords + '</i>'; data = data.replace(regS, reg);