HTML DOM Element blur() Method
- Previous Page attributes
- Next Page childElementCount
- Go to the Previous Level HTML DOM Elements Object
Definition and Usage
blur()
The method removes focus from the element.
See also:
HTML DOM Reference Manual:Element focus() Method
HTML DOM Reference Manual:onblur Event
Example
Example 1
Remove focus from the text field:
document.getElementById("myText").blur();
Example 2
Remove focus from the <a> element:
document.getElementById("myAnchor").blur();
Syntax
HTMLElementObject.blur()
Parameter
None.
Return value
None.
Browser support
element.blur()
It is a feature of DOM Level 2 (2001).
All browsers fully support it:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Support | 9-11 | Support | Support | Support | Support |
- Previous Page attributes
- Next Page childElementCount
- Go to the Previous Level HTML DOM Elements Object