String.prototype.myReplace = function (f, e) {//把f替换成e
var reg = new RegExp(f, "g"); //创建正则RegExp对象
return this.replace(reg, e);
}
转载于:https://www.cnblogs.com/liushunli/p/10083730.html
String.prototype.myReplace = function (f, e) {//把f替换成e
var reg = new RegExp(f, "g"); //创建正则RegExp对象
return this.replace(reg, e);
}
转载于:https://www.cnblogs.com/liushunli/p/10083730.html