“onchange” event delayed in IE? (ok with Firefox)

前端 未结 6 1514
臣服心动
臣服心动 2020-12-10 07:56

It might be a beginner question but I can\'t understand why the onchange event is never called by IE while it works Ok with firefox.



        
6条回答
  •  半阙折子戏
    2020-12-10 08:53

    IE only fires the onchange event when the element loses focus - if you were to click outside the element or tab to a different element it should fire then.

    You can get around this by using a different event, for example onkeypress.

提交回复
热议问题