JS replaceAll 方法实现
String.prototype.replaceAll = function(s1,s2){
return this.replace(new RegExp(s1,"gm"),s2);
}
发布时间: 2012-11-05 09:35:12 作者: rapoo
JS replaceAll 方法实现
String.prototype.replaceAll = function(s1,s2){
return this.replace(new RegExp(s1,"gm"),s2);
}