&

그림에만 오른쪽 마우스 사용못하게 하기

 
· 22년 전 · 5385 · 2
아래 소스를 <head> </head> 사이에 넣습니다...
그러면 그림위에서 오른쪽 마우스 클릭시 스크립 창이 뜹니다.
<script language="JavaScript1.2">
<!--

var clickmessage="그림에는 오른쪽마우스버튼을 사용할 수 없습니다."

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()

// -->
</script>

[이 게시물은 관리자님에 의해 2003-08-11 14:20:07 공부할까요?(으)로 부터 이동됨]
|

댓글 2개

흠~
좋은정보 감사합니다.
댓글을 작성하시려면 로그인이 필요합니다. 로그인

자유게시판

+
제목 글쓴이 날짜 조회
22년 전 조회 8,852
배부른꿀꿀이
22년 전 조회 5,857
22년 전 조회 6,239
&&nbsp;
22년 전 조회 6,332
22년 전 조회 8,133
&&nbsp;&nbsp;
22년 전 조회 5,910
&&nbsp;
22년 전 조회 5,738
&&nbsp;
22년 전 조회 5,762
&&nbsp;
22년 전 조회 6,277
&&nbsp;
22년 전 조회 5,382
&&nbsp;
22년 전 조회 5,495
&&nbsp;
22년 전 조회 5,527
&&nbsp;
22년 전 조회 4,897
&&nbsp;
22년 전 조회 4,959
&&nbsp;
22년 전 조회 5,386
&&nbsp;
22년 전 조회 5,353
&&nbsp;&nbsp;
22년 전 조회 5,568
22년 전 조회 5,803
22년 전 조회 6,003
22년 전 조회 6,257
22년 전 조회 5,807
22년 전 조회 4,890
22년 전 조회 5,436
22년 전 조회 5,141
&&nbsp;&nbsp;
22년 전 조회 5,122
22년 전 조회 5,307
22년 전 조회 5,355
22년 전 조회 5,894
22년 전 조회 5,691
22년 전 조회 6,191
🐛 버그신고