The focus
event fires when an element has received focus. The event does not bubble, but the related focusin
event that follows does bubble.
The opposite of focus
is the blur
event, which fires when the element has lost focus.
The focus
event is not cancelable.