Detecting input change in jQuery?

后端 未结 8 2137
Happy的楠姐
Happy的楠姐 2020-11-22 04:11

When using jquery .change on an input the event will only be fired when the input loses focus

In my case, I need to make a call to the serv

相关标签:
8条回答
  • 2020-11-22 04:39

    If you want the event to be fired whenever something is changed within the element then you could use the keyup event.

    0 讨论(0)
  • 2020-11-22 04:39

    This covers every change to an input using jQuery 1.7 and above:

    $(".inputElement").on("input", null, null, callbackFunction);
    
    0 讨论(0)
提交回复
热议问题