前端开发
  • 产品介绍
  • 微信/手机站模板
  • 电脑站模板
  • 小程序模板
  • 建站问答
  • 应用下载
  • 产品手册
  • 网站百科
  • 建站代理
  • 网站案例
  • 论坛
  • 关于我们
  • 在html中怎么设置内容不能复制

    2020-11-19 09:39:28
    在html中怎么设置内容不能复制

    1、首先,打开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页面,此时内容无法右键和选中以复制。

  • 回顶部
临沂木火网络科技有限公司 版权所有 2022-2027
鲁ICP备16043239号
服务热线: 13013553001