Write a jQuery code to disable right click menu in html page
Answer :
File Name : jQuery3.html
<html>
<head>
<script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
<title>SP Creation</title>
</head>
<body>
<div class="container">
<div id="box" class="col border">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Eos consectetur nulla delectus aliquid aut vel, sit labore, tempora impedit, dolorem quas voluptates! Molestias minus deserunt dolores itaque quo doloribus ab.</p>
</div>
</div>
<script>
$(document).ready(function(){
$(document).bind("contextmenu",function(e){
return false;
});
});
</script>
</body>
</html>
Write a jQuery code to disable right click menu in html page
Reviewed by technical_saurabh
on
April 29, 2021
Rating:
No comments:
Post a Comment