is there a way to implement a text change event to detect text change on an HTML input text field?
It’s possible to simulate these using key events (key press etc), however, it’s really not performant and difficult, is there a better way?
is there a way to implement a text change event to detect text change
Share
When I’m doing something like this I use the onKeyUp event.
but if you don’t want to use an HTML event you could try to use jQuerys .change() method
in this example, the input would have to have a class “target”
if you’re going to have multiple text boxes that you want to have done the same thing when their text is changed and you need their data then you could do this:
that way you can use the same code, for multiple text boxes using the same class without having to rewrite any code.