Java Script JS Common events

Source: Internet
Author: User

OnClick Event
Click events
Ondbclick Events
Double-click event
OnLoad Event
This method is called first when the page starts to load. This method can only be written in the <body> label
onchange Events
triggered when content changes. Can be used in text boxes, list boxes, and other objects, which are typically used in response to other changes that the user modifies the content.

Description: When a user enters text into a text box, the onchange event is not triggered, and only when the user enters the end of the text box, the event is triggered when the text box loses focus, and if it is a drop-down box, it is triggered when the selection ends.
onblur Events and onfocus events
Onblur event that is triggered when the current element loses focus. Corresponds to the onfocus event: Gets the Focus event
Onscroll Events
Window scrolling Event: A function is called when the page scrolls. This event is written outside the method, and no parentheses are followed by the function name, such as Window.onscroll=move
Functionmove () {

?? Alert ("Invoke when Page Scrolls");

??}
Window.onscroll = move;
Mouse-related events
OnMouseMove
Triggers an event call function when the mouse moves over the range of an object. Note: In the same area, the event is triggered once the mouse moves once.
onmouseout
Triggers an event call function when the mouse leaves an object range.
onmouseover
Triggers an event call function when the mouse moves over the range of an object. Note: In the same area, the function is triggered only once, no matter how it moves.
OnMouseUp
Triggering an event when the mouse is released
OnMouseDown
Triggering an event when the mouse button is pressed

Java Script JS Common events

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.