js 给养方法

js 补充方法//replaceAll方法replace 只能替换一个String.prototype.replaceAll function(s1,s2) {retur

js 补充方法


//replaceAll方法  replace 只能替换一个
String.prototype.replaceAll = function(s1,s2) {
    return this.replace(new RegExp(s1,"gm"),s2);
}

//IE 下控制浏览器文字不能被选中
style="-moz-user-select:none;" onselectstart="javascript:return false;"