views:

4025

answers:

3

<select> has this api, what about <input>?

+3  A: 

You can use .change()

$('input[name=myInput]').change(function() { ... });

If that's not quite right for you, you could use some of the other jQuery events like keyup, keydown or keypress - depending on the exact effect you want.

Greg
A: 
$("input").change(function () {
    alert("Changed!");
});
Georg
A: 

I would suggest using the keyup event something like below:

$('elementName').keyup(function() {
 alert("Key up detected");
});

There are a few ways of achieving the same result so I guess it's down to preference and depends on how you want it to work exactly.

Andi