网页内容不能选中、复制应该如何实现呢?

通过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 οncοntextmenu="return false;" onselectstart="return false">
//前面一句是禁止右键,后面一句是禁止复制。

通过js

//禁止页面选择以及鼠标右键
document.οncοntextmenu=function(){return false;}; 
document.onselectstart=function(){return false;};

  

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2022-02-16
  • 2021-11-12
猜你喜欢
  • 2021-11-29
  • 2021-06-11
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2021-10-30
  • 2022-12-23
相关资源
相似解决方案