How to disable right click menu in html page using jQuery?

Hello friends, today I will tell you through experts tool tutorial How to disable right click menu in html page using jQuery? So let’s try to understand step to step with example.

First of all, you create a file named index.html. Save the html code given below in a file named index.html.

index.html

<!DOCTYPE html>
<html>
<title>How to disable right click menu in html page using jQuery?</title><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
<p>How to disable right click menu in html page using jQuery?</p>
</body>
</html>

Then after that add the below jQuery code to the index.html file.

<script>
$(document).ready(function(){
$(document).bind("contextmenu",function(e){
return false;
});
});
</script>

Index.html

<!DOCTYPE html>
<html>
<title>How to disable right click menu in html page using jQuery?</title>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(document).bind("contextmenu",function(e){
return false;
});
});
</script>
</head>
<body>
<p>How to disable right click menu in html page using jQuery?</p>
</body>
</html>