var t = '***感**谢**有**你***'; var r = t.replace(/\*/g,''); //\为转义字符 g表示全局 console.log(r) //感谢有你 转载于:https://www.cnblogs.com/nnnnnn/p/10884939.html