10/10/2018, 10:52
Các bác cho hỏi trang này chống Copy (Quét khổi) kiểu gì
blog.axemphim.com
Khi ta chưa tắt javascript thì ko thể quét khối và click chuột phải,tuy nhiên khi tắt rồi thì có thể click chuột phải nhưng vẫn ko thể quét khối. Em đang thắc mắc là nó dùng cả java và css hay sao mà làm đc như vậy.
Ai biết giải đáp dùm em
Khi ta chưa tắt javascript thì ko thể quét khối và click chuột phải,tuy nhiên khi tắt rồi thì có thể click chuột phải nhưng vẫn ko thể quét khối. Em đang thắc mắc là nó dùng cả java và css hay sao mà làm đc như vậy.
Ai biết giải đáp dùm em
Bài liên quan
<style>
body {
-moz-user-select:none;
}
</style>
<script type='text/javascript'>
document.body.oncopy=function(){
event.returnValue=false;
var s='';
clipboardData.setData('Text',s);
}
</script>
-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
css:
-moz-user-select:none;
[=========> Bổ sung bài viết <=========]
Ai biết đoạn nào chặn cả ie,chrome... thì nói em với
Có vài cái mình ko muốn nhưng khách hàng bắt thì vẫn phải làm mà.
Nhìn nó thế này :
Window.prototype.startMove=function(e){
if(this.onmove){
this.getCursorPos(e);
var dragobj=rel(this.id);
this.leftToPoint=this.cursorX- dragobj.offsetLeft;
this.topToPoint=this.cursorY- dragobj.offsetTop ;
this.focus();
var self=this;
document.onmousemove=function(e){self.moving(e)};
document.onselectstart=function(){return false};
rel('main').setAttribute('style',"-user-select: none; -khtml-user-select: none; -moz-user-select: none;");
}
}