Breaking News

Code chống Ctrl+U và click chuột phải trên Blogspot

Hiện tượng copy bài đang trở thành một vấn nạn khiến rất nhiều SEOer đau đầu. Vậy đâu là phương pháp hiệu quả giúp cải thiện tình trạng này? Bạn có thể sử dụng cách chống ctrl+U và click chuột phải để ngăn chặn nhé!!

Cách hạn chế copy bài trên Blogspot



Code chống Click chuột trái

<style type='text/css'>
body{
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;}
</style>

Code chống Click chuột phải

<script type="text/javascript">
//<![CDATA[
// JavaScript Document
var message="NoRightClicking"; function defeatIE() {if (document.all) {(message);return false;}} function defeatNS(e) {if (document.layers||(document.getElementById&&!document.all)) { if (e.which==2||e.which==3) {(message);return false;}}} if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=defeatNS;} else{document.onmouseup=defeatNS;document.oncontextmenu=defeatIE;} document.oncontextmenu=new Function("return false")
//]]> </script>

Code chống Ctrl+u và F12

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js'/>
<script type='text/javascript'>
checkCtrl=false $(&#39;*&#39;).keydown(function(e){
if(e.keyCode==&#39;17&#39;){ checkCtrl=false  } }).keyup(function(ev){
if(ev.keyCode==&#39;17&#39;){ checkCtrl=false } }).keydown(function(event){
if(checkCtrl){
if(event.keyCode==&#39;85&#39;){ return false; } } })
</script>

Code này sau khi đặt code bạn cần thay đổi thẻ <body> thành <body onkeydown="return false">
Bạn nhớ chèn code trước thẻ </head> nhé!!

Xem thêm: Phương pháp tạo sitemap cho Blogspot

Được tạo bởi Blogger.