Prevent or Disable Copy or Paste In Input Fields

Using jQuery we can disable or prevent copy or pasting of input fields, jQuery has built-in access to this functionality in browsers by exposing them as events, that is by binding any input element like text input, text area, etc, with these events and calling the preventDefault() event which prevents the user from copy or pasting text into these fields. We observe these in many forms, especially ones those of more secure websites(like online banking). Check out the below snippets of its implementation.

Disable Copying

Select Code
$('input').bind('copy', function(e) {

Disable Copying and Pasting

Select Code
$('input').bind('copy paste', function(e) {

3,540 thoughts on “Prevent or Disable Copy or Paste In Input Fields

  1. Admiring the dedication you put into your blog and in depth information you offer. It’s good to come across a blog every once in a while that isn’t the same unwanted rehashed material. Great read! I’ve bookmarked your site and I’m including your RSS feeds to my Google account.|

  2. Have you ever considered adding more videos to your blog site posts to maintain the readers more entertained? I indicate I just study through the entire write-up of yours and it was really excellent but since I’m more of a visual learner,I found that to be more helpful properly let me understand how it turns out! I love what you guys are always up as well. These clever work and reporting! Keep up the wonderful works guys I’ve added you guys to my blogroll. That is a excellent article thanks for sharing this informative information.. I will visit your blog regularly for some latest post.

  3. Pingback: Leroy
  4. Pingback:
  5. Pingback:
  6. Pingback: hlQIedXt
  7. Oh my goodness! Awesome article dude! Thanks, However I am having difficulties with your RSS. I don’t know the reason why I can’t subscribe to it. Is there anybody else getting identical RSS issues? Anybody who knows the solution will you kindly respond? Thanx!!|

  8. Pingback: Bed bugs
  9. Pingback: Bed bug dogs
  10. When I originally commented I appear to have clicked the -Notify me when new comments are added- checkbox and now every time a comment is added I recieve four emails with the same comment. Is there a way you are able to remove me from that service? Cheers!|

  11. Pingback: Bed bugs
  12. Pingback: Bed bug dog
  13. Pingback:
  14. Pingback: miss you sms
  15. Pingback: Johnny
  16. Pingback: tomelloso
  17. Hey there would you mind letting me know which web host you’re working with? I’ve loaded your blog in 3 different browsers and I must say this blog loads a lot faster then most. Can you recommend a good hosting provider at a honest price? Many thanks, I appreciate it!|

  18. Pingback: steven avery
  19. Pingback: website
  20. Pingback:
  21. Pingback:

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>