HTML event set

Source: Internet
Author: User

HtmlEvent Set

General events

Event

Browser support

Description

Onclick

HTML: 2 | 3 | 3.2 |4
Browser:Ie3|N2|O3

Click an event.

Ondblclick

HTML: 2 | 3 | 3.2 |4
Browser:Ie4|N4| O

Double-click event

Onmousedown

HTML: 2 | 3 | 3.2 |4
Browser:Ie4|N4| O

The button on the mouse is pressed.

Onmouseup

HTML: 2 | 3 | 3.2 |4
Browser:Ie4|N4| O

Events triggered when the mouse is pressed and released

Onmouseover

HTML: 2 | 3 | 3.2 |4
Browser:Ie3|N2|O3

Event triggered when you move the cursor over an object range

Onmousemove

HTML: 2 | 3 | 3.2 |4
Browser:Ie4|N4| O

Events triggered when you move the mouse

Onmouseout

HTML: 2 | 3 | 3.2 |4
Browser:Ie4|N3|O3

Event triggered when the mouse leaves the range of an object

Onkeypress

HTML: 2 | 3 | 3.2 |4
Browser:Ie4|N4| O

Events triggered when a key on the keyboard is pressed and released. [Note: the page must contain focused objects]

Onkeydown

HTML: 2 | 3 | 3.2 |4
Browser:Ie4|N4| O

Events triggered when a key is pressed on the keyboard [NOTE: The page must contain focused objects]

Onkeyup

HTML: 2 | 3 | 3.2 |4
Browser:Ie4|N4| O

Events triggered when a button on the keyboard is pressed and opened [NOTE: The page must contain focused objects]

Page related events

Event

Browser support

Description

Onabort

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4|N3| O

The image is interrupted by the user during download.

Onbeforeunload

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4| N | o

Events triggered when the content of the current page is about to be changed

Onerror

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4|N3| O

Capture errors on the current page for some reason, such as script errors and external data references.

Onload

HTML: 2 | 3 | 3.2 |4
Browser:Ie3|N2|O3

Events triggered when an empty page is sent to the browser, including external file Introduction

Onmove

HTML: 1 | 3 | 3.2 | 4
Browser: IE |N4| O

Events triggered when the browser window is moved

Onresize

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4|N4| O

Events triggered when the browser window size is changed

Onscroll

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4| N | o

Events triggered when the browser's scroll bar position changes

Onstop

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Events triggered when the browser stop button is pressed or files being downloaded are interrupted

OnUnload

HTML: 2 | 3 | 3.2 |4
Browser:Ie3|N2|O3

Events triggered when the current page is changed

Form-related events

Event

Browser support

Description

Onblur

HTML: 2 | 3 | 3.2 |4
Browser:Ie3|N2|O3

Events triggered when the current element loses focus [both mouse and keyboard triggers]

Onchange

HTML: 2 | 3 | 3.2 |4
Browser:Ie3|N2|O3

Events triggered when the current element loses focus and the element content changes [both mouse and keyboard triggers]

Onfocus

HTML: 2 | 3 | 3.2 |4
Browser:Ie3|N2|O3

Event triggered when an element gets focus

Onreset

HTML: 2 | 3 | 3.2 |4
Browser:Ie4|N3|O3

Events triggered when the reset attribute in the form is fired

Onsubmit

HTML: 2 | 3 | 3.2 |4
Browser:Ie3|N2|O3

Events triggered when a form is submitted

Rolling subtitle events

Event

Browser support

Description

Onbounce

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4| N | o

Events triggered when content in marquee is moved out of the marquee display range

Onfinish

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4| N | o

Event triggered when the marquee element completes the content to be displayed

Onstart

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4| N | o

Events triggered when the marquee element starts to display content

Edit event

Event

Browser support

Description

Onbeforecopy

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Events triggered when the selected content on the page is to be copied to the viewer's clipboard

Onbeforecut

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Events 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

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

The current element is about to enter the editing status.

Onbeforepaste

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

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

Onbeforeupdate

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

The target object is notified when the viewer pastes the content in the system clipboard.

Oncontextmenu

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Events triggered when the viewer presses the right-click menu or triggers the page menu by pressing the keyboard button [try adding oncontentmenu = "Return false" to <body> On the page to disable the use right-click]

Oncopy

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Events triggered when the selected content on the page is copied

Oncut

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Event triggered when the selected content on the page is cut

Ondrag

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Event [activity event] triggered when an object is dragged

Ondragdrop

HTML: 1 | 3 | 3.2 | 4
Browser: IE |N4| O

An external object is dragged to the current window or frame by the mouse

Ondragend

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

The event triggered when the mouse is dragged to the end, that is, the mouse button is released.

Ondragenter

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Event triggered when an object that is dragged by the mouse enters its container range

Ondragleave

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Event triggered when an object that is dragged by the mouse leaves its container range

Ondragover

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Event [activity event] triggered when a dragged object is dragged within the range of another object container

Ondragstart

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4| N | o

Event triggered when an object is dragged

Ondrop

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

The event triggered when the mouse key is released during a drag process.

Onlosecapture

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Event triggered when an element loses its focus.

Onpaste

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Events triggered when the content is pasted

Onselect

HTML: 2 | 3 | 3.2 |4
Browser:Ie4| N | o

Event when text content is selected

Onselectstart

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4| N | o

Event triggered when the text content is selected

Data Binding

Event

Browser support

Description

Onafterupdate

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4| N | o

Event triggered when data is transferred from a data source to an object.

Oncellchange

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

When the data source changes

Ondataavailable

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4| N | o

Event triggered when data reception is complete

Ondatasetchanged

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4| N | o

Events triggered when data sources change

Ondatasetcomplete

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4| N | o

Event triggered when all valid data of the Child data source is read

Onerrorupdate

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4| N | o

When the onbeforeupdate event is used to trigger the cancellation of data transfer, the onafterupdate event is replaced

Onrowenter

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Events triggered when the data in the current data source changes and new valid data exists

Onrowexit

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

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

Onrowsdelete

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Events triggered when the current data record is deleted

Onrowsinserted

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Events triggered when a new data record is to be inserted to the current data source

External events

Event

Browser support

Description

Onafterprint

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Events triggered when a document is printed

Onbeforeprint

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Events triggered when the document is about to be printed

Onfilterchange

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4| N | o

Events triggered when the filter effect of an object changes

Onhelp

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4| N | o

Event triggered when the viewer presses F1 or the browser's help Selection

Onpropertychange

HTML: 1 | 3 | 3.2 | 4
Browser:Ie5| N | o

Event triggered when one of the object's attributes changes

Onreadystatechange

HTML: 1 | 3 | 3.2 | 4
Browser:Ie4| N | o

Event triggered when the object's initialization property value changes

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.