What\'s the best way of validating an HTML text input as it\'s typed? All ways I know of doing it has some drawbacks:
Using $.keypress you only
$.keypress
You can use the input (FF) and propertychange (all others) events to catch all forms of input including keyboard and rmb cut paste.
input
propertychange
http://jsfiddle.net/dFBzW/
$('input').bind('input propertychange', function() { $('#output').html($(this).val()); });