Javascript event details

Source: Internet
Author: User

Description of javascript event list
Event browser support explanation
This event is triggered when an onclick ie3 or n2 mouse is clicked.
This event is triggered when you double-click an ondblclick ie4 or n4 mouse.
Onmousedown ie4 and n4 trigger this event when you press the mouse
This event is triggered when onmouseup ie4 and n4 are clicked and the mouse is released.
Onmouseover ie3 and n2 trigger this event when you move the mouse over an object range
This event is triggered when the onmousemove ie4 and n4 are moved.
Onmouseout ie4 and n3 trigger this event when the mouse leaves a certain object range
Onkeypress ie4 and n4 trigger this event when a key on the keyboard is pressed and released.
Onkeydown ie4, n4 this event is triggered when a key on the keyboard is pressed
Onkeyup ie4, n4 this event is triggered when a button on the keyboard is pressed and opened
Page-related events onabort ie4 and n3 images are interrupted by users during download
Onbeforeunload ie4, n this event is triggered when the content of the current page is about to be changed
This event is triggered when an error occurs in onerror ie4 and n3.
This event is triggered when the onload ie3 and n2 page content is complete.
This event is triggered when the windows of the onmove ie and n4 browsers are moved.
Onresize ie4 and n4 trigger this event when the browser's window size is changed
This event is triggered when the position of the onscroll ie4 or n browser's scroll bar changes.
This event is triggered when the stop button of the onstop ie5 or n browser is pressed or the file being downloaded is interrupted.
This event is triggered when the current page of onunload ie3 and n2 is changed.
This event is triggered when the current onblur ie3 and n2 elements lose focus.
Onchange ie3, n2: this event is triggered when the current element loses focus and the content of the element changes.
Onfocus ie3 and n2 trigger this event when an element obtains focus
Onreset ie4, n3 this event is triggered when the reset attribute in the form is fired
This event is triggered when an onsubmit ie3 or n2 form is submitted.
This event is triggered when the onbounce ie4 and n content in marquee is moved out of the marquee display range.
Onfinish ie4, n this event is triggered when the marquee element completes the content to be displayed
Onstart ie4, n this event is triggered when the marquee element begins to display content
Edit event onbeforecopy ie5 and n trigger this event when the selected content on the page is to be copied to the clipboard of the browser System
Onbeforecut ie5, n this event is triggered when part or all of the content on the page is removed from the current page [clipboard] and moved to the browser's system clipboard
Onbeforeeditfocus ie5, n the current element will enter the editing status
This event is triggered when onbeforepaste ie5 and n content is to be transferred [pasted] to the page from the browser's system clipboard
Onbeforeupdate ie5 and n notify the target object when the viewer pastes the content in the system clipboard.
Oncontextmenu ie5 and n events triggered when the viewer presses the right-click menu to display the event or triggers the page menu by pressing the keyboard button
Oncopy ie5, n this event is triggered when the selected content on the page is copied
Oncut ie5, n this event is triggered when the selected content on the page is cut
Ondrag ie5 and n: this event is triggered when an object is dragged. [activity event]
Ondragdrop ie, n4 an external object is dragged into the current window or frame by the mouse
Ondragend ie5, n this event is triggered when the mouse drag ends, that is, the mouse button is released
Ondragenter ie5, n this event is triggered when the object is dragged by the mouse into its container range
Ondragleave ie5, n this event is triggered when the object is dragged by the mouse out of its container range
Ondragover ie5, n this event is triggered when a dragged object is dragged within the range of another object container
Ondragstart ie4, n this event is triggered when an object is dragged
Ondrop ie5 and n trigger this event when the mouse key is released during a drag process
Onlosecapture ie5, n this event is triggered when the selection focus formed by the element's mouse movement is lost
Onpaste ie5 and n trigger this event when the content is pasted
Onselect ie4, n event when text content is selected
Onselectstart ie4 and n events triggered when the text content is selected
Data Binding onafterupdate ie4 and n trigger this event when data is transferred from the data source to the object
Oncellchange ie5 and n when the data source changes
Ondataavailable ie4 and n trigger an event when data reception is complete
Ondatasetchanged ie4 and n events triggered when data sources change
Ondatasetcomplete ie4 and n this event is triggered when all valid data of the sub-data source is read.
Onerrorupdate ie4 and n Replace the onafterupdate event when the onbeforeupdate event is triggered to cancel Data Transmission
Onrowenter ie5, n events triggered when the data in the current data source changes and new valid data exists
Onrowexit ie5 and n events triggered when the data in the current data source is about to change
This event is triggered when the onrowsdelete ie5 and n current data records are deleted.
Onrowsinserted ie5 and n this event is triggered when the current data source is about to insert a new data record
External event onafterprint ie5, n this event is triggered when the document is printed
Onbeforeprint ie5, n this event is triggered when the document is about to be printed
Onfilterchange ie4, n events triggered when the filter effect of an object changes
Onhelp ie4, n this event is triggered when the viewer presses f1 or the browser's help Selection
Onpropertychange ie5, n this event is triggered when one of the object's properties Changes
Onreadystatechange ie4, n this event is triggered when the object's initialization property value changes
<Table class = "bbcode"> </table> onactivate is triggered when the object is set to an active element.
Onafterupdate is triggered when the associated object in the data source object is updated successfully on the Data Binding object.
Onbeforedeactivate is triggered immediately before activeelement changes from the current object to another object in the parent document.
Onbeforeupdate is triggered on the Data Binding object before the associated objects in the data source object are successfully updated.
Onblur is triggered when the object loses the input focus.
Oncontrolselect is triggered when you want to create a control area for this object.
Ondeactivate is triggered when activeelement changes from the current object to another object in the parent document.
Onerrorupdate is triggered when an error occurs while updating the associated data in the data source object.
Onfocus is triggered when the object obtains the focus.
Onload is triggered immediately after the browser completes object loading.
Onmove is triggered when the object is moved.
Onmoveend is triggered when the object is stopped.
Onmovestart is triggered when the object begins to move.
Onreadystatechange is triggered when the object state changes.
Onresizeend is triggered when you change the object size in the selected area of the control.
Onresizestart is triggered when you start to change the object size in the selected area of the control.
Ontimeerror is triggered unconditionally when an error occurs at a specific time. It is usually caused by setting the attribute to an invalid value. :

How to concatenate javascript events to execute multiple processing procedures
When I used to write javascript programs, all events used
Object. event = handler;

. This method is common for internet explorer, mozilla/firefox, and opera. However, one problem is that this method only corresponds to one event processing process. If you want an event to be able to execute multiple processing procedures in sequence, it is not easy to use.
However, internet explorer provides an attachevent method from 5.0. With this method, you can assign multiple processing processes to an event. Attachevent is also applicable to opera. But the problem is that mozilla/firefox does not support this method. However, it supports another addeventlistener method, which is similar to attachevent and is used to assign multiple processing processes to an event. However, there are some differences between the events they assign. In the attachevent method, the events start with "on", and in the addeventlistener, the "on" with no start with the event ", in addition, addeventlistener has a third parameter. Generally, this parameter can be set to false.
Therefore, to assign multiple processing processes to an event in your program, you only need to first determine the browser, and then choose whether to use attachevent or addeventlistener based on different browsers. Example:
If (document. all ){
Window. attachevent ('onload', handler1 );
Window. attachevent ('onload', handler2 );
} Else {
Window. addeventlistener ('load', handler1, false );
Window. addeventlistener ('load', handler2, false );
}

Note: The execution sequence of multiple processes assigned by attachevent is random, so there should be no sequential dependency between these processes. In addition, attachevent and addeventlistener are not only applicable to window objects, but also some other objects support this method.

This article is from "My Super invincible blog"

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.