Disable Right Click in Browser
Thanks to Charles for showing me the light.
<script>
isNN = document.layers ? 1 : 0;
function noContext(){return false;}
function noContextKey(e) {
if(isNN){
if (e.keyCode == 96){ return (false);}
} else {
if (event.keyCode == 96){ return (false);}
}
}
function noClick(e){
if(isNN){
if(e.which > 1) {return false;}
} else {
if(event.button > 1){return false;}
}
}
if(isNN){
document.captureEvents(Event.MOUSEDOWN);
}
document.oncontextmenu = noContext;
document.onkeypress = noContextKey;
document.onmousedown = noClick;
document.onmouseup = noClick;
</script>
Posted 10:27 PM
|
0 comments
|
Permalink