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>

  • 相关阅读:
    【FJOI2014】【偏导+数学】病毒防护带
    脏读、不可重复读 共享锁、悲观锁 和 事务五种隔离级别
    数据库锁机制
    Clgb动态代理
    乐观锁和悲观锁
    Jstl自定义标签
    orcale应用
    Ajax
    AOP
    Git 配置过程
  • 原文地址:https://www.cnblogs.com/guanzelin/p/8467201.html
Copyright © 2011-2022 走看看