Home >Web Front-end >Front-end Q&A >What are the event drivers of javascript?

What are the event drivers of javascript?

藏色散人
藏色散人Original
2021-09-10 11:22:102861browse

The event drivers of JavaScript are: 1. Mouse click event "onclick"; 2. Content change event "onchange"; 3. Select event "onselect"; 4. Get focus event "onFocus"; 5. Lost focus event "onBlur" etc.

What are the event drivers of javascript?

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

What are the event drivers for javascript?

Event-driven in javaScript

Event-driven in javascript is triggered by mouse or hotkey actions. The main events are as follows:

 1. Mouse click event onclick For example: ()

Usually used for the following controls:

button button object

checkbox check box or check list--with onclick click event, usually used for all-select effect

radio radio button

   Reset reset button

   submit button

2. Content change event onchange such as: ()

Usually used for

text text input box--with onchange, it can achieve the effect of registration detection

Textarea text area

3. Select event onselect - This event is triggered when the content of text or textarea is highlighted

4. Get focus event onFocus - Occurs when the object gets focus

5. The focus-losing event onBlur --corresponds to the focus-gaining event!

 6. Document loading event onload --The event is triggered when the document is loaded. It is also usually called a loading event (loading run) and is generally used to set cookies

7. Unload document event onunload --corresponds to the load document event. Occurs when the web page exits, usually updating the cookie value

8. Right mouse button menu function event oncontextmenu - can be used when blocking the right mouse button

Recommended learning: " JavaScript basic tutorial

The above is the detailed content of What are the event drivers of 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