In web browsers, what's the difference between onblur and onfocusout?

前端 未结 5 1530
一向
一向 2020-12-02 21:59

If they\'re the same, then why there are two of this kind of event?

5条回答
  •  盖世英雄少女心
    2020-12-02 22:31

    Acccording to the spec for the focusout event type:

    This event type is similar to blur, but is dispatched before focus is shifted, and does bubble.

    Whereas blur events do bubble, and are dispatched later.

提交回复
热议问题