Tags

All you need is to bind cut, copy and paste function to Textbox and stop the current action. See below code.

$(document).ready(function(){
  $('#txtInput').live("cut copy paste",function(e) {
      e.preventDefault();
  });
});

You can also use bind function to bind these events. Read more about bind() method here.
$(document).ready(function(){
$('#txtInput').bind("cut copy paste",function(e) {
e.preventDefault();
});
});

But it is suggested to use live() method. Read more about live() method here and read thisarticle to find out the difference between bind() and live().
Advertisements