Input Text blur()Method

Input Text 对象参考手册Input Text Object

Examples

Remove focus from the text field:

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

Try it yourself »


Definition and Usage

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

Tip:To give focus to a text field, use thefocus()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 对象参考手册Input Text Object Other Extensions