&

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

 
· 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,834
배부른꿀꿀이
22년 전 조회 5,854
22년 전 조회 6,236
&&nbsp;
22년 전 조회 6,328
22년 전 조회 8,131
&&nbsp;&nbsp;
22년 전 조회 5,910
&&nbsp;
22년 전 조회 5,738
&&nbsp;
22년 전 조회 5,762
&&nbsp;
22년 전 조회 6,260
&&nbsp;
22년 전 조회 5,379
&&nbsp;
22년 전 조회 5,493
&&nbsp;
22년 전 조회 5,523
&&nbsp;
22년 전 조회 4,896
&&nbsp;
22년 전 조회 4,958
&&nbsp;
22년 전 조회 5,386
&&nbsp;
22년 전 조회 5,351
&&nbsp;&nbsp;
22년 전 조회 5,567
22년 전 조회 5,802
22년 전 조회 6,003
22년 전 조회 6,256
22년 전 조회 5,797
22년 전 조회 4,889
22년 전 조회 5,436
22년 전 조회 5,141
&&nbsp;&nbsp;
22년 전 조회 5,121
22년 전 조회 5,302
22년 전 조회 5,351
22년 전 조회 5,889
22년 전 조회 5,690
22년 전 조회 6,190
🐛 버그신고