12-01javascript Event (events)

Source: Internet
Author: User

JS Event

1. JS events are often used in conjunction with functions to drive the execution of functions by events that occur, resulting in different effects on HTML.

2. Properties (Functions that trigger function{} when the properties of these events occur):

1) Onabort: When the image load is interrupted, functions inside the function are raised.

2) Onbur: When the element loses focus;

3) Onfocus: When the element gets focus

4) OnClick: mouse click on an object

5) Ondbclick: Mouse Double-click an object

6) OnError: An error occurred while loading a document or image

7) OnChange: When the user changes the contents of the domain (onchange event is often combined with the input field validation to use, the common language form verification ID, email registration and login, area code and so on is the correct format)

8) OnKeyDown: Key of one keyboard is pressed

9) onkeypress: Key of a keyboard is pressed or held down

OnKeyUp: Key of one keyboard is loosened

OnLoad: A page or image is finished loading

OnMouseDown: A mouse button is pressed (onmousedown, onmouseup, and onclick form all parts of the mouse click event. First, when the mouse button is clicked, the OnMouseDown event is triggered, and when the mouse button is released, the OnMouseUp event is triggered, and the onclick event is triggered when the mouse click is completed. )

OnMouseMove: Mouse is moved

onmouseout: The mouse moves away from an element

onMouseOver: The mouse is moved above an element

OnMouseUp: One mouse button is loosened (difference onkeyup)

OnReset: Reset button is clicked

OnResize: The window or frame is resized

Onselect: Text is selected

OnSubmit: The Submit button is clicked

OnUnload: User Exit page

12-01javascript Event (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.