Hello,
If you want to prevent your user from performing right click on your web site in Internet Explorer then you can try this basic trick to do it. Although its not 100% accurate but still it works and can be done easily where its not that much important to really disable it.
Just Add "oncontextmenu="return false"" to you body tage in HTML
<BODY oncontextmenu="return false">
When any user perform right click on the web page the menu is requested, the oncontextmenu event runs, and we instantly cancel it using JavaScript. this way you can prevent your user to view some precious code and even prevent your user to open web page in multiple windows to.
cheers
If you want to prevent your user from performing right click on your web site in Internet Explorer then you can try this basic trick to do it. Although its not 100% accurate but still it works and can be done easily where its not that much important to really disable it.
Just Add "oncontextmenu="return false"" to you body tage in HTML
<BODY oncontextmenu="return false">
When any user perform right click on the web page the menu is requested, the oncontextmenu event runs, and we instantly cancel it using JavaScript. this way you can prevent your user to view some precious code and even prevent your user to open web page in multiple windows to.
cheers
3 comments:
Nice post dear, it works fine in all IE, Mozilla Firefox and Google Chrome. Thanks dear
Nice post dear, it works fine in all IE, Mozilla Firefox and Google Chrome. I checked it dear, thanks
It works. Thanks dude...
Post a Comment