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

前端 未结 5 1529
一向
一向 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:28

    The focusout event fires when an element is about to lose focus.

    The main difference between this event and blur is that focusout bubbles while blur does not. Most times, they can be used interchangeably.

提交回复
热议问题