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

JS replaceAll 步骤实现

2012-11-05 
JS replaceAll 方法实现String.prototype.replaceAll function(s1,s2){return this.replace(new RegExp(s

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

热点排行