ITeye博客

js 补充方法

winder_sety · 2012-11-08 09:28 · JS常用方法 · Web前端 · Markdown

//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;"
 

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。