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 »

Description

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 Edge Firefox Safari Opera IE
Yes Yes Yes Yes Yes 9-11

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.