In this post i am explaining, how to use JQuery code for disable right click functionality on browser. This is also one of the good JQuery Interview Questions.
Output:
Output:
<html> <head> <title></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $(document).bind("contextmenu", function(e) { alert('Right click is disabled'); e.preventDefault(); //or return false; // }); }); </script> </head> <body> </body> </html>
Post a Comment
Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.