Chống Chuột phải - viewsource
<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>
<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>
Chống Ctr + u
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js'/>
<script type='text/javascript'>
checkCtrl=false $('*').keydown(function(e){
if(e.keyCode=='17'){ checkCtrl=false } }).keyup(function(ev){
if(ev.keyCode=='17'){ checkCtrl=false } }).keydown(function(event){
if(checkCtrl){
if(event.keyCode=='85'){ return false; } } })
</script>
sau khi thêm đoạn script trên trước thẻ </head> tiếp theo, chung ta tìm thẻ <body> thay thẻ
<body> Thành <body onkeydown="return false">
No comments:
Post a Comment