help5305 发表于 2013-2-3 10:36:45

实现js的replaceAll方法

转载http://www.iteye.com/topic/67544


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

挺好用滴
页: [1]
查看完整版本: 实现js的replaceAll方法