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. });


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.