161
rated 0 times
[
163]
[
2]
/ answers: 1 / hits: 8336
/ 11 Years ago, thu, january 2, 2014, 12:00:00
I need to prevent the single and double quotes from being pasted in a text area in javascript
HTML
<textarea rows=10 cols=10 id=txtTest></texarea>
Preventing the single and double quotes on keydown
$('#txtTest').on('keydown', function(e){
if(e.shiftKey && e.keyCode == 222 || e.keyCode == 222){
e.stopPropagation();
}
});
How to prevent the same when the text is pasted. (ctrl + v)
More From » jquery