How can I disable Paste (Ctrl+V) option using jQuery in one of my input text fields?
This now works for IE FF Chrome properly... I have not tested for other browsers though
$(document).ready(function(){
$('#txtInput').on("cut copy paste",function(e) {
e.preventDefault();
});
});
Edit: As pointed out by webeno, .bind()
is deprecated hence it is recommended to use .on()
instead.