Sometimes you want to prevent user from right clicking on your web pages or images from being copied. It may be because of some security reasons. You can secure your web pages or images by disabling right click.
Please note that, It is impossible to prevent webpages or images from being stolen/copied completely, since there are so many tools and utilities through which one can copy yours images.
To achieve this, Add the below event handler to the image tag.
Disable right click on images:
1. Javascript Approach:
<img src="http://i250.photobucket.com/albums/gg247/dsuraj/General/disablerightclick_zpscc89f5c6.png" oncontextmenu="return false;" />
2. jQuery Approach:
$('img').bind('contextmenu', function(e){ return false; });
Disable right click on a web page:
1. Javascript Approach:
<html> <head> ... </head> <body oncontextmenu="return false;" > ... </body> </html>
2. jQuery Approach:
$(document).bind("contextmenu",function(e){ return false; });
Maaf.. saya berterus terang … walaupun saya kurang bersetuju dengan awak…
tapi saya akui… pendapat awak memang logik dan pos nih memang menarik..
LikeLike