JavaScript blur() Method Tutorial

In this section, we will learn what the Element blur() method is and how to use it in JavaScript.

What is Element blur() Method in JavaScript?

The JavaScript Element `blur()` method is used to blur or basically take off the focus from an element.

For example, if you have a text box on a page and it has the current focus (which means users can start to type in that box) you can use the `blur()` method to programmatically set off that focus.

Element blur() Method Syntax:


Element blur() Method Parameter

The method does not take an argument.

Element blur() Method Return Value

The method does not return a value.

Example: using element blur() method in JavaScript

See the Pen using element blur() method in JavaScript by Omid Dehghan (@odchan1) on CodePen.


Top Technologies