Filename | script chống coppy và bôi đen bài viết |
Permission | rw-r--r-- |
Author | Unknown |
Date and Time | 21:20 |
Label | Scripts |
Action |
<script type="text/javascript">
window.onload = function() {
disableSelection(document.body)
}
function disableSelection(target){
if (typeof target.onselectstart!="undefined")
target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined")
target.style.MozUserSelect="none"
else
target.onmousedown=function(){return false}
target.style.cursor = "default"
}
</script>
chống click chuột phải :
<script type="text/javascript">
function mousedwn(e) {
try { if (event.button == 2||event.button == 3) return false; }
catch (e) { if (e.which == 3) return false; }
}
document.oncontextmenu = function() { return false; }
document.ondragstart = function() { return false; }
document.onmousedown = mousedwn;
</script>
0 nhận xét:
Đăng nhận xét