Thursday, March 11, 2010

How to disable Right Click on a Web Page – with HTML

There are many ways to prevent the use of Right Click on a Web page, but the most popular one was to use a JavaScript code to disable Right Click. With JavaScript you can either display a custom message like “No Right Clicks Allowed” or just annoy the user by no response.

Any ways I strongly recommend that you do not Disable Right Clicks on your site. One thing is that the user gets a hostile feeling and may not prefer to return. Then, there is no such thing as a complete foolproof way to prevent users from copying or saving your content. In my experience I was successful in copying the content from sites I visited and which used such a foolish technique.

However if you still want to disable right click, here is a simple HTML way to do so

1 . View the HTML source code of your webpage and locate the tag.
2 . Paste this inside the tag
ondragstart=”return false” onselectstart=”return false” onContextMenu=”return false”
Now the code will look something like


This is the basic of all right click disabling techniques

No comments: