Home >Web Front-end >JS Tutorial >How to remove focus in javascript

How to remove focus in javascript

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-06-15 10:01:043012browse

Javascript method to remove focus: 1. Use the onblurs attribute, the syntax "onblur="js code that needs to be executed"; 2. Use the blur() function, the syntax "$(selector).blur(function );".

How to remove focus in javascript

The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.

javascript focus removal

1. Use the onblurs attribute

The onblur attribute is triggered when the element loses focus.

Syntax

onblur="SomeJavaScriptCode"

HTML tags that support this event attribute:

, ,

, , , < ;bdo>, ,
,

The above is the detailed content of How to remove focus 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
Previous article:What are the ways to introduce JavaScript?Next article:What are the ways to introduce JavaScript?

Related articles

See more