js 扩展replaceAll

//扩展replaceAll;
String.prototype.replaceAll = function(s1,s2) {
return this.replace(new RegExp(s1,"gm"),s2);
}

posted @ 2014-10-10 10:04  NewObject_1  阅读(154)  评论(0编辑  收藏  举报