Javascript function to disable right click
Disabling right click using Javascript function.
<script language="javascript" type="text/javascript">var IE;var NN;if(navigator.appName=="Microsoft Internet Explorer"){ IE=true;}if(navigator.appName=="Netscape"){ NN=true;}function right(click){ if(IE&&(event.button==2||event.button==3)) { alert('The right click is disabled'); false; } if(NN&&(click.which==2||click.which==3)) { alert('The right click is disabled'); false; }}if(document.layers)window.captureEvents(Events.MOUSEDOWN)if(document.layers)window.captureEvents(Events.MOUSEUP)document.onmousedown=right;document.onmouseup=right;window.document.layers=right;</script>
0 Comments:
Post a Comment
<< Home