Javascript onchange different in IE and FireFox

后端 未结 3 789
花落未央
花落未央 2021-01-24 22:21

When this onchange event in IE returns false, IE focus stays on that input box. In Firefox the focus always moves to the next field regardless.

HTML:

i         


        
3条回答
  •  面向向阳花
    2021-01-24 23:20

    Have you tried adding a "return" in the onchange attribute? i.e.

    
    

    I'm not entirely sure that this would work, but worth a try?

    Edit: to clarify, the reason I'm not sure is that I'd usually approach this differently and bind the event handler in javascript rather than html.

提交回复
热议问题