javascript-tutorialsmade

Disable Right Click – One line script for all browsers

A single attribute which helps us to disable Right Click Event and this script will work for all the browsers including IE Old Versions.

Here you are:

Add this attribute in the <body> tag of your website pages.

Example:

 

If you have already own a website which has 1000’s of pages, then use this method to add the attribute using jQuery:

Put this code where you call a JavaScript in all of your pages:

 

I hope this would have helped you. Thanks!

 

Related Posts

2 thoughts on “Disable Right Click – One line script for all browsers

Leave a Reply