实现网页中的内容不能选中…
js原生方法
// js禁用页面选中
document.onselectstart=function(){return false;};
css方法
// 通过css
*{
moz-user-select: -moz-none;
-moz-user-select: none;
-o-user-select:none;
-khtml-user-select:none;
-webkit-user-select:none;
-ms-user-select:none;
user-select:none;
}
通过body
// 通过body标签
<body onselectstart="return false"></body>