Disabling Cut, Copy, and Paste Operations in Textbox and Textarea
- Article
- Comment
Let’s start making a textbox and disable the cut copy and paste operations, let me create a HTML Textbox and making it to does not allow users to Cut, Copy Paste and typed datas.
<input type="text" name="kv_text_box_disable_edit" id="kv_textbox" value="" >
This is a sample textbox and now we are going to disable the cut copy operations by using jQuery.
<script type="text/javascript"> $(document).ready(function() { $('#kv_text_box').bind('copy paste cut',function(e) { e.preventDefault(); //this line will help us to disable cut,copy,paste }); }); </script>
The above function will disable the Cut Copy and Paste Operations. But you can delete it.
Read here to disable “ctrl” key and specific key on your Client Browser.