微信小程序字符串替换

替换全部   如果需替换字符串需要/要加转义符

var str = 'welcome /our world';
var str2 = str.replace(/\/o/g,'123');

 
  
 
  

你可能感兴趣的:(“js”)