Home  >  Article  >  Web Front-end  >  What is blur in javascript

What is blur in javascript

藏色散人
藏色散人Original
2021-07-01 10:41:056843browse

Blur in JavaScript means losing focus; when the user clicks on a text input box with the mouse, a focus will be generated accordingly, and when the user clicks elsewhere, the cursor disappears and the text box disappears. Lost focus.

What is blur in javascript

The operating environment of this article: windows7 system, javascript version 1.8.5, DELL G3 computer

What is blur in javascript?

Specific questions:

For example, what does this.blur() do? What does it mean to lose focus or move out of focus?

Analysis:

blur() means losing focus. Simply put, when you click the page with the mouse, a focus will be generated accordingly. For example, if you click on a text input box, the cursor will move there. At this time, the text box will gain focus. When you click elsewhere, the cursor will disappear and the text box will lose focus.

When you click on a hyperlink, a dotted line will appear around the hyperlink, and it will also gain focus.

The two examples mentioned above are simple and visible elements. There are many invisible elements or containers that can also get focus, such as SPAN, DIV, P, etc., after you click You don't see the page changing, but it actually gets focus.

Recommended study: "javascript Advanced Tutorial"

The above is the detailed content of What is blur in javascript. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn