Just add the following code inbetween section of your html file
<script language="javascript"> var message="Sorry, you do not have permission to right click."; function RestrictIE(){ if (event.button==2){ alert(message); return false; } } function RestrictNS(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=RestrictNS; } else if (document.all&&!document.getElementById){ document.onmousedown=RestrictIE; } document.oncontextmenu=new Function("alert(message);return false;") </script>
now you can test in your browser.
TESTED WITH : IE 8.0, Firefox 3.5+, Chrome 12.0
1 comment:
Click for more info
Click for more info
Click for more info
Click for more info
Click for more info
Click for more info
Click for more info
Click for more info
Click for more info
Click for more info
Post a Comment