What are the event drivers of javascript?

藏色散人
Release: 2023-01-11 09:19:14
Original
2733 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!