JS 字符串替换replaceAll
// 字符串对象扩展replaceAll方法
String.prototype.replaceAll = function(s1, s2) {
return this.replace(new RegExp(s1, "gm"), s2);
}
// 字符串对象扩展replaceAll方法
String.prototype.replaceAll = function(s1, s2) {
return this.replace(new RegExp(s1, "gm"), s2);
}