Attaches an event handler callback function to the “focus” event of an element.
onFocus
(callback)<a>
, <input>
, <button>
, <textarea>
, etc.), or are otherwise made focusable (e.g. by setting the tabindex
property). Also note that focus may behavior may not be the same across different platforms.