Multiple choice technology web technology

Which event is triggered when an element loses focus?

  1. onfocusout

  2. onblur

  3. onfocuslost

  4. All of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The onblur event fires when an element loses focus. It's the opposite of onfocus, which fires when an element gains focus. JavaScript uses 'blur' as the standard term for losing focus, not 'focusout' or 'focuslost'.