Disable Right Click Menu on any of your Web page
Sometimes we need to protect our contents like Text, images or our source code for our webpage to being used by others for this purpose we need to put some security on our code so that no one can use our contents without our permission.
There are many methods to protect our contents but here i am going to share simple javascript code which will disable Right Click even also disable context menu from keyboard key. To achieve just copy the following javascript code and paste it where you want to protect (e.g div, p, body) anywhere where you want.
Here in above code I applied the inline JavaScript in body, in result this will disable Rigth Context Menu for whole page. You can apply anywhere in any section if you don't want to protect whole page.
That's It. I hope like this post I you still have any confusion then let me know in comments.
0 Comments