//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;"
本文介绍了JavaScript中的字符串替换方法 `replaceAll` 的使用,以及如何在IE浏览器下实现文字不可选功能。
//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;"

被折叠的 条评论
为什么被折叠?