简体   繁体   中英

Jquery: How can i track changes in input elements?

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 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)

你能不能只为“改变”,“粘贴”和“剪切”事件绑定处理程序,以及“按键”或“键盘”?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM