Disallow typing of few of characters e.g.'<', '>' in all input textboxes using jquery

Posted by Ismail on Stack Overflow See other posts from Stack Overflow or by Ismail
Published on 2010-06-16T13:14:53Z Indexed on 2010/06/16 13:32 UTC
Read the original article Hit count: 164

Filed under:
|
|
|

How do I achieve this:-
When user types character like 'abcd' and then '>'(an invalid character for my application), I want to set the text back to 'abcd'. Better if we can cancel the input itself as we do in winforms application. This should happen when user is typing and not on a click of button.

I want this to be applied on all text boxes in my web page. This will be easy if the solution is jQuery based. May be something which will start like this.
$("input[type='text']")

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about JavaScript