js - 各浏览器不兼容方法 replaceAll 解决
在脚本最顶上定义该方法
String.prototype.replaceAll = function(s1,s2){ return this.replace(new RegExp(s1,"gm"),s2); }
本文来自博客园,作者:岑惜,转载请注明原文链接:https://www.cnblogs.com/c2g5201314/p/15993248.html
响应开源精神相互学习,内容良币驱除劣币
在脚本最顶上定义该方法
String.prototype.replaceAll = function(s1,s2){ return this.replace(new RegExp(s1,"gm"),s2); }
本文来自博客园,作者:岑惜,转载请注明原文链接:https://www.cnblogs.com/c2g5201314/p/15993248.html
响应开源精神相互学习,内容良币驱除劣币