Deep understanding of event-driven basics in javaScript
Source: Internet
Author: User
This article provides a detailed analysis of event-driven in javaScript. For details, refer to the event-driven events in javascript that are triggered by mouse or hotkey actions as follows:
1. Click the event onclick as follows :( )
It is usually used for the following controls:
Button Object Checkbox check box or check list-with onclick click event, it is usually used to select all results
Radio button
Reset button
Submit button
2. content change event onchange as follows :( )
Usually used
Text input box-with onchange, registration detection can be achieved
Textarea text field 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 onBlur event that loses focus -- corresponds to the event that gets focus!
6. document loading event onload -- when a document is loaded, it is a trigger event. Usually called loading events (loading and running), it is generally used to set cookies.
7. Uninstall document event onunload -- corresponds to document event loading. When the web page exits, the cookie value is usually updated.
8. Right-click menu function event oncontextmenu -- can be used to shield the right mouse
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service