开发者

Jquery: How can i track changes in input elements?

开发者 https://www.devze.com 2023-02-05 03:59 出处:网络
I need to track changes on an input element but this should be done whenever anything change its value, not only users typing.

I need to track changes on an input element but this should be done whenever anything change its value, not only users typing.

The keyup event is not what i need as already specified and the change event only works when the input loses focus.

Any ideas开发者_如何学Go of how can i do this?


In non-IE browsers, you can handle the input event.
In IE, you can handle the propertychange event.

Demo (works in all browsers)


Can you not just bind handlers for the "change", "paste", and "cut" events, as well as "keypress" or "keyup"?

0

精彩评论

暂无评论...
验证码 换一张
取 消