User Tools

<HTMLElement>.onBlur()

Attaches an event handler callback function to the “blur” event of an element.

Usage:
HTMLElement = Element.onBlur(callback)
Member of:
HTMLElement
Parameters:
callback – the function to call when the “blur” event occurs (required).
Returns:
The HTMLElement it was called on, thus allowing for command chaining.
Notes:
  • This is just a shorthand function for the .on method, specific for the “blur” event. See there for more information and examples.
  • The “blur” event handler can be attached to any HTMLElement, but of course only makes sense for elements which are either naturally focusable (e.g. <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.

See also

More information

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information