Welcome to W3Courses
 Like Us on Facebook

Right Clicking

Disable Right Clicking on Webpage, Images and Photos with JavaScript

Add the following code to the head section of your html document to disable right clicking on your webpage. This way, users wll not be able to right click and save pictures or photographs from your website.

Note: However, users can use other ways to save the photos from your website such as looking at the source code and browsing to the location of the picture and then save it.

<script language=JavaScript>
<!-- //Hide from old Browsers