HTML DOM blur() Method
Example
Remove focus from an <a> element:
document.getElementById("myAnchor").blur();
Try it Yourself »
More "Try it Yourself" examples below.
Definition and Usage
The blur() method is used to remove focus from an element.
Tip: Use the focus() method to give focus to an element.
Browser Support
Method | |||||
---|---|---|---|---|---|
blur() | Yes | Yes | Yes | Yes | Yes |
Syntax
HTMLElementObject.blur()
Parameters
None |
Technical Details
Return Value: | No return value |
---|
More Examples
Related Pages
HTML DOM reference: onblur event
❮ Element Object