-
在html中怎么设置内容不能复制
2020-11-19 09:39:281、首先,打开html编辑器,新建html文件,例如:index.html,输入一下基础代码。
2、在index.html中的<body>标签中,输入样式代码:
<BODY oncontextmenu="return false" onselectstart="return false"
ondragstart="return false" onbeforecopy="return false" oncopy=document.selection.empty() onselect=document.selection.empty()>3、浏览器运行index.html页面,此时内容无法右键和选中以复制。