Jquery disable right click, cut, copy and paste example
I will show you how to prevent mouse right click, cut copy paste in your web page, div, image, element, iframe etc. so basically you can not right click or copy paste from your browser.
we will use context menu for disable mouse right click.
we will use bind event with cut copy paste operation for preventing copy, cut and paste options. you can same perform with javascript to prevent right click.
In this example, we will simple include jquery using cdn file. than we will write code to disable cut copy paste from whole page after that write contextmenu event for disable mouse right click. So let's just see bellow html code and use it.
Example:
<!DOCTYPE html>
<html>
<head>
<title>Jquery disable right click, cut, copy and paste example - ItSolutionstuff.com</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
<h1>Jquery disable right click, cut, copy and paste example - ItSolutionstuff.com</h1>
<script type="text/javascript">
$(document).ready(function () {
//Disable cut copy paste
$(document).bind('cut copy paste', function (e) {
e.preventDefault();
});
//Disable mouse right click
$(document).on("contextmenu",function(e){
return false;
});
});
</script>
</body>
</html>
I hope it can helper you...

Hardik Savani
I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.
We are Recommending you
- Display Loading Image when AJAX Call is in Progress Example
- How to Create Scroll to Top of the Page by JQuery Animate?
- How to Remove Specific Value from Array in JQuery?
- How to Each Loop with Class Element in JQuery?
- Automatically Scroll to Bottom of Div JQuery Example
- Check and Uncheck All Checkbox using JQuery Example
- How to Check Object is Empty or Not in JQuery?