The user will not be directly changing the input box, so keyup/keypress is not useful. Since onchange is triggered when the input box loses focus, I cannot use change()
or onchange()
. The external jquery is modifying the input, so I cannot use trigger()
. Is there any other method to do this without using setInterval
?
As far as i know, there's a DOM LEVEL EVENT that fires when anything changes, but it's not supported by all browsers, in fact, i think only Chrome and FireFox does.
Here's a link to a solution for this: Detect changes in the DOM
hope it helps.
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.