Javascript trigger event list

Source: Internet
Author: User
1. Click Event ___ onclick

Events generated when you click the mouse button. At the same time, the event processing specified by onclickProgramOrCodeWill be called for execution.

For example, <input type = "button" value = "open page" onlick = "window. Open

('Xxxx.html ', 'newwindow', 'width = 456, Height = 230, toolbar = No, menubar = No, scrollbars = Yes ');

">

2. Change event ___ onchange
This event occurs when the character values in the text or textarea element change or the Select Table option state changes.
For example, <textarea name = "liuyan" rows = 5 Cols = 70 value = "" onchange = alert ("You added new content to the text box")>

3. Selected event ____ onselect
This event is triggered when the text in the text or textarea object is selected.
For example: <ipnut type = "text" value = "default information" onselect = alert ("text in text box selected")>

4. Obtain the focus event ____ onfocus
When you click Text, textarea, and select objects, this event is generated when the cursor falls in the text box or select box.
For example: <select name = "zhengjian" onfocus = "alert (" I am the Focus ")>

5. Loss of focus events ______ onblur
The loss of the Focus event is exactly opposite to the result of obtaining the focus event. This event is triggered when the text object, textarea object, or select object no longer has the focus and exits the background.

6. file loading event ____ onload
When a page file is loaded, one function of generating this event. onload is to detect the cookie value when a page file is loaded for the first time and assign a value to it with a variable so that it can beSource codeThis event is a window event, but when an event handler is specified in HTML, it is generally written in the <body> tag.
For example: <body onload = alert ("loading page, please wait...")>

7. File uninstallation event ____ onUnload
In contrast to the file loading event onload, the event is triggered when the web page exits and the cookie status can be updated.
For example, <body onUnload = "Confirm (" are you sure you want to leave this page? ")>

8. Mouse overwrite event _____ onmouseover
Onmouseover is an event that is triggered when the cursor is over the element.
For example, <input type = "boutton" value = "button" onmouseover = "window. Status = 'please note the following status bar'; return true">

9. Mouse exit event _____ onmouseout
Onmouseout is an event triggered by the mouse exit element. If you use the event with the mouse overwrite, you can create a dynamic button effect.

10. General events
Ondbclick double-click event
Event activated when the mouse button is pressed
Events triggered when you press the mouse and release the mouse
The event triggered by moving the mouse.
Onkeypress: An event triggered when a key on the keyboard is pressed and released. An active object must exist on the page.
Onkeydown: An event triggered when a key on the keyboard is pressed. An active object must exist on the page.
Onkeyup: An event triggered when a key on the keyboard is opened. An active object must exist on the page.

11. Page related events
The onabort image is interrupted by the user during download.
Onbeforeunload event triggered when the content of the current page is about to be changed
Onerror captures errors on the current page for some reason, such as script errors.
Event triggered when the window of the onmove browser is moved
Onresize event triggered when the browser size is changed
Event triggered when the position of the onscroll browser scroll bar changes
Event triggered when the stop button of the onstop browser is pressed or the file being downloaded is interrupted.

12. Form-related events
Onreset events triggered when the reset attribute in the form is activated.
Onsubmit the event triggered when a form is submitted.

13. Rolling subtitle events
Onbounce events triggered when content in marquee is moved beyond the marquee display range.
Onfinish the event triggered when the marquee element completes the content to be displayed.
Onstart event triggered when the marquee element starts to display the content.

14. Edit the event.
Onbeforecopy events triggered when the selected content on the page is to be copied to the clipboard of the browser system.
Onbeforeupdate: notifies the target object when the viewer pastes the content in the system clipboard.
Oncontextmenu events triggered when you right-click a menu or press a keyboard button to trigger a page menu.
<Body oncontentmenu = "Return false"> do not right-click
Oncopy event triggered when the selected content on the page is copied
Oncut event triggered when the selected content on the page is cut
Onpaste event triggered when the content is pasted
Ondrag event triggered when an object is dragged
Ondragend: The event triggered when the mouse is dragged to the end, that is, the event triggered when the mouse button is released.

15. data Binding
onafterupdate event triggered when data is transferred from the data source to the object
oncellchange event triggered when data source changes
ondataavailable when data is received event
event triggered when the ondatasetchanged data source changes.
ondatasetcomplete event triggered when all valid data of the data source is read.
onerrorupdate replaces the onafterupdate event when the onbeforeupdate event is triggered to cancel data transfer.
events triggered when the data in the current data source of onrowenter changes and new valid data exists.
events triggered when the data in the onrowexit current data source is about to change
events triggered when the onrowsdelete current data record is deleted
the onrowsinserted data source is about to insert new data records event triggered

16. external events
onafterprint events triggered when the document is printed
onbeforeprint events triggered when the document is about to be printed
onhelp when the viewer presses the F1 key or clicks" event triggered when the Help button is used

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.