admin管理员组文章数量:1316980
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?
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?
Share Improve this question edited Jun 18, 2015 at 22:19 royhowie 11.2k14 gold badges53 silver badges67 bronze badges asked Jan 16, 2011 at 18:54 FernandoFernando 4,6294 gold badges28 silver badges40 bronze badges 2- When you say "whenever anything change its value" are you talking about the value being changed via some other javascript code? – user113716 Commented Jan 16, 2011 at 19:00
- Yes, via javascript code and user input ( keypress and browser autoplete ). – Fernando Commented Jan 16, 2011 at 19:20
2 Answers
Reset to default 6In 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"?
本文标签: javascriptJquery How can i track changes in input elementsStack Overflow
版权声明:本文标题:javascript - Jquery: How can i track changes in input elements? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742000433a2410900.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论