반응형
이미지 다운 금지... 물론 한계는 있지만 그래도 올려 보았습니다.
<PRE>
<script language="JavaScript1.2">
var clickmessage="You Cannot save this Image"
function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage); return false; }
}
}
if (document.layers) {
if (e.which == 3) {
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.layers) {
associateimages()}
</script>
</HEAD>
<BODY bgcolor=lightyellow>
<table align=center width=50% border=0 >
<tr><td> <h3>마우스 오른쪽 버튼을 클릭 해 보세요</h3> </td></tr>
<tr><td> <img src="img.jpg" border=1> </td></tr>
</table>
</PRE>
<PRE>
<script language="JavaScript1.2">
var clickmessage="You Cannot save this Image"
function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage); return false; }
}
}
if (document.layers) {
if (e.which == 3) {
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.layers) {
associateimages()}
</script>
</HEAD>
<BODY bgcolor=lightyellow>
<table align=center width=50% border=0 >
<tr><td> <h3>마우스 오른쪽 버튼을 클릭 해 보세요</h3> </td></tr>
<tr><td> <img src="img.jpg" border=1> </td></tr>
</table>
</PRE>