사용자함수 웹페이지 내용 복사 방지 (드래그 방지)
페이지 정보

본문
//불펌 클릭방지( 마우스 드래그 방지)
var Protection = {
omitformtags : ["input", "textarea", "select"], //제외 태그들..
disableSelect : function(e){
this.omitformtags=this.omitformtags.join("|");
if(this.omitformtags.indexOf(e.target.tagName.toLowerCase())==-1) return false;
},
reEnable : function(){
return true;
},
init : function(){
if (typeof document.onselectstart!="undefined"){
document.onselectstart=new Function ("return false");
}else{
document.onmousedown=this.disableSelect;
document.onmouseup=this.reEnable;
}
}
}
$(document).ready(function(){
Protection.init(); //복사방지
});
- 이전글new XMLHttpRequest(); 18.11.23
- 다음글[정규식] replace에서 모든 문자열 치환하기 18.11.19
댓글목록
등록된 댓글이 없습니다.

