There are many ways the value of a <input type="text">
can change, including:
- keypresses
- copy/paste
- modified with JavaScript
- auto-completed by browser or a toolbar
I want my JavaScript function to be called (with the current input value) any time it changes. And I want it to be called right away, not just when the input loses focus.
I’m looking for the cleanest and most robust way to do this across all browsers (using jQuery preferably).