Phuket IT

Computer => Web Site => Topic started by: aegkaluk on 13, 05, 2013, 11:02:41

Title: Disable Cut, Copy and Paste function for textbox using jQuery
Post by: aegkaluk on 13, 05, 2013, 11:02:41
Code: [Select]
$(document).ready(function(){
  $('#txtInput').live("cut copy paste",function(e) {
      e.preventDefault();
  });
});
!
Code: [Select]
$(document).ready(function(){
  $('#txtInput').bind("cut copy paste",function(e) {
      e.preventDefault();
  });
});

Ref: http://jquerybyexample.blogspot.com/2010/12/disable-cut-copy-and-paste-function-for.html