Best way to track onchange as-you-type in input type=“text”?

后端 未结 16 1172
天命终不由人
天命终不由人 2020-11-22 08:42

In my experience, input type=\"text\" onchange event usually occurs only after you leave (blur) the control.

Is there a way to

16条回答
  •  长发绾君心
    2020-11-22 08:48

    Below code works fine for me with Jquery 1.8.3

    HTML :

    Javascript/JQuery:

    $("#myId").on('change keydown paste input', function(){
          doSomething();
    });
    

提交回复
热议问题