Posted By

luhonghai on 01/14/15


Tagged

javascript jquery


Versions (?)

Detect Copy, Paste and Cut Behavior With jQuery


 / Published in: jQuery
 

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

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

  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  

You need to login to post a comment.