zoukankan      html  css  js  c++  java
  • wordpress怎么禁止文章复制

    登陆你的网站后台--点击菜单栏的“外观”--点击“编辑”--在右侧,找到footer.php,打开它--在</body>之前加入以下代码:

    1.禁止复制

    <script type="text/Javascript"> 
    <!-- 
    document.oncontextmenu=function(e){return false;}; 
    document.onselectstart=function(e){return false;}; 
    //--> 
    </script> 
    <style> 
    body{ 
    -moz-user-select:none; 

    </style> 
    <SCRIPT LANGUAGE=javascript><!-- 
    if (top.location != self.location)top.location=self.location; 
    // --></SCRIPT> 
    <noscript><iframe src=*.html></iframe></noscript>

    2.右键复制时显示提示语

    把下面代码放到footer.php里即可

    <html> 
    <head><title>防复制</title><meta http-equiv="Content-Type" cont
    ent="text/html; charset=utf-8" /></head> 
    <script> 
    function stop(){ 
    alert('鄙视盗版,尊重版权,人人有责!'); 
    return false; 

    document.oncontextmenu=stop; 
    </script> 
    <body onselectstart="return false" onpaste="return false" oncop
    y="return false;" 
    oncut="return false;" > 
    </body> 
    </html>

  • 相关阅读:
    Deepin Linux下安装安卓应用的各种方式
    win下的终端使用指南
    IDEA自定义TODO
    WSL的ssh-agent问题
    MySQL数据类型
    MySQL常用命令.md
    Period 时间坑
    exp/imp管理
    expdp和impdp管理(逻辑导入导出)
    同义词
  • 原文地址:https://www.cnblogs.com/guanzelin/p/8467201.html
Copyright © 2011-2022 走看看