How to Disable Right Click on The Page or Element?

It is very easy to diable right click on the page or on particular element.

use     oncontextmenu  property inside the element

Example:

On Page:

<body oncontextmenu=”return false;”></body>

On Element

<div  oncontextmenu=”return false;”></body>

<section oncontextmenu=”return false;”></section>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s