HTML DOM Element blur()
Examples
Remove focus from a text field:
document.getElementById("myText").blur();
Try it Yourself »
Remove focus from an <a> element:
document.getElementById("myAnchor").blur();
Try it Yourself »
Definition and Usage
The blur()
method removes focus from an element.
Syntax
HTMLElementObject.blur()
Parameters
NONE |
Return Value
NONE |
Browser Support
element.blur()
is a DOM Level 2 (2001) feature.
It is fully supported in all browsers:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | 9-11 | Yes | Yes | Yes | Yes |