Detect Copy, Paste and Cut Behavior With jQuery


/ Published in: jQuery
Save to your folder(s)

To detect copy, paste and cut behavior, you just need to bind the corresponding event type.


Copy this code and paste it in your HTML
  1. $("#textA").bind('copy', function() {
  2. $('span').text('copy behaviour detected!')
  3. });
  4. $("#textA").bind('paste', function() {
  5. $('span').text('paste behaviour detected!')
  6. });
  7. $("#textA").bind('cut', function() {
  8. $('span').text('cut behaviour detected!')
  9. });

URL: http://simply-tutorial.com/blog/2010/05/20/how-to-detect-copy-paste-and-cut-behavior-with-jquery/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.