How to disable cut copy and paste using jQuery

Follow us

This can be achieved using bind() method of jQuery.

The bind() is an inbuilt method in jQuery which is used to attach one or more event handlers for selected element and this method specifies a function to run when an event occurs.

$(selector).bind(event,data, function{});

To make it work, you would need to add cut, copy and paste events on which the bind will work. Here e.preventDefault() will prevent from the respective events that we have mentioned.

Here is sample example of how to disable the cut/copy/paste using jQuery :

<!DOCTYPE html>
		<title>Example : how to disable cut copy and paste using jquery </title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<script src=""></script>
		<script type="text/javascript">
			$(document).ready(function() {
				 $('#textbox').bind('copy paste cut',function(e) { 
				 e.preventDefault(); //disable cut,copy,paste
				 alert('cut,copy & paste options are disabled !!');
		<label>Demo Text Box</label>
		<input type="text" name="textBox" id="textbox" />