wp文章怎样禁止被复制

登陆你的网站后台–点击菜单栏的“外观”–点击“编辑”–在右侧,找到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>