Deep understanding of event-driven in javaScript

Source: Internet
Author: User

Event-driven events in javascript are triggered by mouse or hot key actions as follows:
1. Click the event onclick as follows: (<input type = "button" value = "click" onclick = "execute statement. Process"/>)
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: (<input type = "text" onchange = "triggered content"/>)
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

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.