Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Input Text blur() method

Input Text blur() method

Input Text Object Reference The Input Text object

Example

Remove the focus from a text field:

document.getElementById("myText").blur();

Try it »


Definition and Usage

The blur() method is used to remove the focus from a text field.

Tip: If you need to set the focus to the text field, use focus() method.


Browser support

Internet Explorer Firefox Opera Google Chrome Safari

All major browsers support the blur() method.


Syntax

textObject

.blur()

Parameters

None.

Technical details

Return Value: No return value

Input Text Object Reference The Input Text object