首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

兑现js的replaceAll方法

2012-11-01 
实现js的replaceAll方法转载http://www.iteye.com/topic/67544String.prototype.replaceAll function(s1,

实现js的replaceAll方法
转载http://www.iteye.com/topic/67544


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


挺好用滴

热点排行