일반 소스보기 금지와 같이 사용하세요.
아래 소스는 body안에 삽입하세요.
<script language="JavaScript1.2">
/*
Disable right click script II (on images)- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
*/
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.getElementById)
document.onmousedown=disableclick
else if (document.layers)
associateimages()
</script>
아래 소스는 body안에 삽입하세요.
<script language="JavaScript1.2">
/*
Disable right click script II (on images)- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
*/
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.getElementById)
document.onmousedown=disableclick
else if (document.layers)
associateimages()
</script>
'인터넷관련' 카테고리의 다른 글
링크된 곳에 마우스 오버시 칼러 생기게하기 (0) | 2008.01.28 |
---|---|
글씨가 돌면서 마우스 따라다님 (0) | 2008.01.28 |
글씨가 무자게 커진당! (0) | 2008.01.28 |
글씨가 왼쪽에서 오른쪽 끝으로 사라집니다. (0) | 2008.01.28 |
마우스를 대면 이미지가 변신합니다 1 (0) | 2008.01.24 |
이미지가 서서히 밝아짐 (0) | 2008.01.24 |
한문장씩 위로 스크롤 되면서 사라짐 (0) | 2008.01.24 |
글씨가 커졌다 작아졌다. (0) | 2008.01.24 |