/***********************************************
* Disable select-text script- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
//form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]
omitformtags=omitformtags.join("|")
function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}
function reEnable(){
return true
}
if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
댓글 3개
$g4[body_script] = "oncontextmenu=\"return false\" ondragstart=\"return false\" onselectstart=\"return false\" ";
이렇게 넣으시는데
위 소스중 아래 부분중에서
oncontextmenu=\"return false\" ondragstart=\"return false\" onselectstart=\"return false\"
필요없는 항목은 삭제하시고 사용하세요....^^
오늘 다른 소스 있길래 적용해 보았더니. 완전히 차단 되어서
드래그만 막고 싶은 충동이 있었는데..
얼른 적용하여 보겠읍니다. ^^
적용 결과.. 순간 첨은 당황 했죠. <? ?> 이거 않넣고 넣어서..^^
다음은.. 역시 불여우는 통과 해버렷읍니다.
document.onmousedown=disableselect;
이런 부분을 삽입하면 드래그는 막는데. 텍스트 에리어? 까지 막아서.
글쓰기 같은거 하려면 우측마우스로 선택해야 하더라구요..
그래서 드래그만 막는것을 배우고 싶읍니다.
/***********************************************
* Disable select-text script- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
//form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]
omitformtags=omitformtags.join("|")
function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}
function reEnable(){
return true
}
if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
</script>