Using jQuery you can disable context menu when you right click on any HTML page. To do so add a very small script in <HEAD> section of HTML page after linking it to jQuery.
Here is the script :
<script type="text/javascript">
$(function(){
$("form").form();
$(this).bind("contextmenu", function(e) {
e.preventDefault();
});
});
</script>
After putting this script to the header section of your page, <head> section looks like this
</head>
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(function(){
$("form").form();
$(this).bind("contextmenu", function(e) {
e.preventDefault();
});
});
</script>
</head>
Welcome to the GEEK world, best place where you find topic about latest cutting edge technology on website and mobile. Learn and grow your knowledge with the information and tutorials about Website designing, CSS tutorials, Java Script tutorials, Ruby tutorials, ROR tutorials, HTML tutorials, HTML5 , JQuery, Javascript tutorials, Photoshop tutorials, Flash, games tutorials, Cheat sheets, Design tools, Action Scripts as well as MySql, Oracle and many more in a easy way to use and understand.
Monday, May 21, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment