Javascript event processing

Source: Internet
Author: User

Javascript event processing

General events

This event is triggered when the onclick mouse is clicked.

This event is triggered when the ondblclick mouse is double-clicked.

This event is triggered when onmousedown is clicked.

This event is triggered when the onmouseup mouse is pressed and the mouse is released

Onmouseover: this event is triggered when the mouse moves over an object range.

This event is triggered when the onmousemove mouse moves

Onmouseout: this event is triggered when the mouse leaves an object range.

Onkeypress: this event is triggered when a key on the keyboard is pressed and released.

Onkeydown: this event is triggered when a key on the keyboard is pressed.

Onkeyup: this event is triggered when a button on the keyboard is pressed and opened.

Page related events

The onabort image is interrupted by the user during download.

This event is triggered when the content on the current page of onbeforeunload is about to be changed.

This event is triggered when an onerror occurs.

This event is triggered when the onload page content is complete.

This event is triggered when the window of the onmove browser is moved.

Onresize triggers this event when the browser's window size is changed

This event is triggered when the position of the onscroll browser scroll bar changes.

This event is triggered when the stop button of the onstop browser is pressed or the file being downloaded is interrupted.

This event is triggered when the onunload current page is changed

Form-related events

This event is triggered when the current onblur element loses focus.

Onchange: this event is triggered when the current element loses focus and the content of the element changes.

Onfocus: this event is triggered when an element obtains focus.

Onreset: this event is triggered when the RESET attribute in the form is fired.

Onsubmit triggers this event when a form is submitted

Rolling subtitle events

This event is triggered when onbounce's content in Marquee is moved out of the Marquee display range.

Onfinish: this event is triggered when the Marquee element completes the content to be displayed.

Onstart triggers this event when the Marquee element begins to display content

Edit event

Onbeforecopy: this event is triggered when the selected content on the page is to be copied to the clipboard of the browser system.

Onbeforecut 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 the current element is going to edit

This event is triggered when the onbeforepaste content is to be transferred [pasted] to the page from the browser's system clipboard

Onbeforeupdate: notifies the target object when the viewer pastes the content in the system clipboard.

Oncontextmenu events that are triggered when the viewer right-clicks a menu or uses a keyboard button to trigger a page menu

Oncopy: this event is triggered when the selected content on the page is copied.

Oncut triggers this event when the selected content on the page is cut

Ondrag triggers this event when an object is dragged [activity event]

Ondragdrop an external object is dragged into the current window or frame by the mouse

Ondragend: this event is triggered when the mouse is dragged to an end, that is, the mouse button is released.

Ondragenter: this event is triggered when an object that is dragged by the mouse enters its container range.

Ondragleave triggers this event when an object that is dragged by the mouse leaves its container range.

Ondragover this event is triggered when a dragged object is dragged within the range of another object container.

Ondragstart: this event is triggered when an object is dragged.

Ondrop triggers this event when the mouse button is released during a drag process.

Onlosecapture this event is triggered when the selection focus formed by the element's mouse movement is lost.

Onpaste triggers this event when the content is pasted

Onselect event when text content is selected

Onselectstart event triggered when the text content is selected

Data Binding

Onafterupdate: this event is triggered when data is transferred from the data source to the object.

Oncellchange when the data source changes

Ondataavailable triggers an event when data reception is complete

Event triggered when the ondatasetchanged data source changes

Ondatasetcomplete this event is triggered when all valid data of the Child data source is read.

Onerrorupdate: When the onBeforeUpdate event is triggered to cancel data transfer, the onAfterUpdate event is replaced.

Event triggered when the current data source of onrowenter changes and new valid data exists

Event triggered when the data of the current onrowexit data source is about to change

Onrowsdelete this event is triggered when the current data record is deleted

Onrowsinserted this event is triggered when the current data source is about to insert a new data record

External events

Onafterprint this event is triggered when the document is printed

Onbeforeprint triggers this event when the document is about to be printed

Onfilterchange event triggered when the filter effect of an object changes

Onhelp: this event is triggered when the viewer presses F1 or the browser's help selection.

Onpropertychange: this event is triggered when one of the object's properties changes.

Onreadystatechange: this event is triggered when the object's initialization property value changes.

The event processing function can be referenced directly in the script segment without inserting html tags,

Var B _save = document. getElementById ("save"); B _save.onclick = function () {alert ("click the save button! ");}

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.