Search.../

blur( )

Removes focus from the element.

Description

The blur() function removes focus from the element and fires a blur event.

The blur event handlers set on this element by the onBlur( ) function or in the Editor are called.

Removing focus through a call to this function is equivalent to a user clicking on another element or tabbing out of the element manually.

If blur() is called on an element that is not in focus, it has no effect. The element in focus remains in focus and the onBlur event handlers are not called.

Syntax

function blur(): void

blur Parameters

This function does not take any parameters.

Returns

This function does not return anything.

Return Type:

void
Mixed in from:$w.FocusMixin

Related Content:

Was this helpful?

Remove focus from an element

Copy Code
1$w("#myElement").blur();