资源事件
事件名称何时触发
资源加载失败时。
正在加载资源已经被中止时。
资源及其相关资源已完成加载。
window,document 及其资源即将被卸载。
文档或一个依赖资源正在被卸载。
网络事件
事件名称何时触发
浏览器已获得网络访问。
浏览器已失去网络访问。
焦点事件
事件名称何时触发
元素获得焦点(不会冒泡)。
元素失去焦点(不会冒泡)。
WebSocket 事件
事件名称何时触发
WebSocket 连接已建立。
通过 WebSocket 接收到一条消息。
WebSocket 连接异常被关闭(比如有些数据无法发送)。
WebSocket 连接已关闭。
会话历史事件
事件名称何时触发
A session history entry is being traversed from.
A session history entry is being traversed to.
A session history entry is being navigated to (in certain cases).
CSS 动画事件
事件名称何时触发
某个 CSS 动画开始时触发。
某个 CSS 动画完成时触发。
某个 CSS 动画完成后重新开始时触发。
CSS 过渡事件
事件名称何时触发
A CSS transition has actually started (fired after any delay).
A CSS transition has begun running (fired before any delay starts).
表单事件
事件名称何时触发
点击重置按钮时
点击提交按钮
打印事件
时间名称何时触发
文本写作事件
Event NameFired When
The composition of a passage of text is prepared (similar to keydown for a keyboard input, but works with other inputs such as speech recognition).
A character is added to a passage of text being composed.
The composition of a passage of text has been completed or canceled.
视图事件
Event NameFired When
An element was turned to fullscreen mode or back to normal mode.
It was impossible to switch to fullscreen mode for technical reasons or because the permission was denied.
The document view has been resized.
The document view or an element has been scrolled.
剪贴板事件
Event NameFired When
已经剪贴选中的文本内容并且复制到了剪贴板。
已经把选中的文本内容复制到了剪贴板。
从剪贴板复制的文本内容被粘贴。
键盘事件
Event NameFired When
按下任意按键。
除 Shift、Fn、CapsLock 外的任意键被按住。(连续触发。)
释放任意按键。
鼠标事件
Event NameFired When
A pointing device button (ANY non-primary button) has been pressed and released on an element.
在元素上按下并释放任意鼠标按键。
右键点击(在右键菜单显示前触发)。
在元素上双击鼠标按钮。
在元素上按下任意鼠标按钮。
指针移到有事件监听的元素内。
指针移出元素范围外(不冒泡)。
指针在元素内移动时持续触发。
指针移到有事件监听的元素或者它的子元素内。
指针移出元素,或者移到它的子元素上。
在元素上释放任意鼠标按键。
可能因为一些技术的原因鼠标锁定被禁止时。
有文本被选中。
滚轮向任意方向滚动。
拖放事件
Event NameFired When
正在拖动元素或文本选区(在此过程中持续触发,每 350ms 触发一次)
拖放操作结束。(松开鼠标按钮或按下 Esc 键)
被拖动的元素或文本选区移入有效释放目标区
用户开始拖动HTML元素或选中的文本
被拖动的元素或文本选区移出有效释放目标区
被拖动的元素或文本选区正在有效释放目标上被拖动 (在此过程中持续触发,每350ms触发一次)
元素在有效释放目标区上释放
媒体事件
Event NameFired When
The input buffer of a ScriptProcessorNode is ready to be processed.
The browser can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
The browser estimates it can play the media up to its end without stopping for content buffering.
The rendering of an OfflineAudioContext is terminated.
The duration attribute has been updated.
The media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it.
Playback has stopped because the end of the media was reached.
The first frame of the media has finished loading.
The metadata has been loaded.
Playback has been paused.
Playback has begun.
Playback is ready to start after having been paused or delayed due to lack of data.
The playback rate has changed.
A seek operation completed.
A seek operation began.
The user agent is trying to fetch media data, but data is unexpectedly not forthcoming.
Media data loading has been suspended.
The time indicated by the currentTime attribute has been updated.
The volume has changed.
Playback has stopped because of a temporary lack of data.
进度事件
Event NameFired When
Progression has been terminated (not due to an error).
Progression has failed.
Progression has been successful.
Progress has stopped (after "error", "abort" or "load" have been dispatched).
Progress has begun.
In progress.
Progression is terminated due to preset time expiring.
存储事件
更新事件
值变化事件
未分类的事件
不常见和非标准事件
Abortable Fetch events
Event nameFired when
A DOM request is aborted, i.e. using AbortController.abort().
WebVR events
Event nameFired when
When a VR display is able to be presented to, for example if an HMD has been moved to bring it out of standby, or woken up by being put on.
when presentation to a VRDisplay has been paused for some reason by the browser, OS, or VR hardware — for example, while the user is interacting with a system menu or browser, to prevent tracking or loss of experience.
when a compatible VRDisplay is connected to the computer.
When a VRDisplay can no longer be presented to, for example if an HMD has gone into standby or sleep mode due to a period of inactivity.
When a compatible VRDisplay is disconnected from the computer.
When presentation to a VRDisplay has resumed after being blurred.
The presenting state of a VRDisplay changes — i.e. goes from presenting to not presenting, or vice versa.
SVG 事件
数据库事件
脚本事件
菜单事件
窗口事件
弹出事件
Tab 事件
电池事件
呼叫事件
传感器事件
智能卡事件
短信和USSD事件
帧事件
DOM变异事件
触摸事件
指针事件
标准事件
这些事件在官方Web规范中定义,并且应在各个浏览器中通用。 每个事件都和代表事件接收方的对象(由此您可以查到每个事件提供的数据),定义这个事件的标准或标准链接会一起列出。
事件名称事件类型规范触发时机...
A SMIL animation element begins.
An open connection to a database is blocking a versionchange transaction on the same database.
An element has lost focus (does not bubble).
The spoken utterance reaches a word or sentence boundary
The user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
The user agent can play the media up to its end without having to stop for further buffering of content.
The change event is fired for , , and elements when a change to the element's value is committed by the user.
The battery begins or stops charging.
The chargingTime attribute has been updated.
A pointing device button has been pressed and released on an element.
A WebSocket connection has been closed.
A transaction successfully completed.
The composition of a passage of text has been completed or canceled.
The composition of a passage of text is prepared (similar to keydown for a keyboard input, but works with other inputs such as speech recognition).
A character is added to a passage of text being composed.
The right button of the mouse is clicked (before the context menu is displayed).
The text selection has been added to the clipboard.
The text selection has been removed from the document and added to the clipboard.
A pointing device button is clicked twice on an element.
A media device such as a camera, microphone, or speaker is connected or removed from the system.
The dischargingTime attribute has been updated.
DOMActivate
A button, link or state changing element is activated (use
The value of an attribute has been modified (use mutation observers instead).
The document has finished loading (but not its dependent resources).
DOMFocusIn
An element has received focus (use
DOMFocusOut
An element has lost focus (use
A node has been added as a child of another node (use mutation observers instead).
A node has been removed from its parent node (use mutation observers instead).
An element or text selection is being dragged (every 350ms).
A drag operation is being ended (by releasing a mouse button or hitting the escape key).
A dragged element or text selection enters a valid drop target.
A dragged element or text selection leaves a valid drop target.
An element or text selection is being dragged over a valid drop target (every 350ms).
The user starts dragging an element or text selection.
An element is dropped on a valid drop target.
The duration attribute has been updated.
The media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it.
The speech recognition service has disconnected.
The utterance has finished being spoken.
Playback has stopped because the end of the media was reached.
Playback has stopped because the end of the media was reached.
A SMIL animation element ends.
A resource failed to load.
A WebSocket connection has been closed with prejudice (some data couldn't be sent for example).
An event source connection has been failed.
A request caused an error and failed.
A speech recognition error occurs.
An error occurs that prevents the utterance from being successfully spoken.
An element has received focus (does not bubble).
An element is about to receive focus (bubbles).
An element is about to lose focus (bubbles).
An element was turned to fullscreen mode or back to normal mode.
It was impossible to switch to fullscreen mode for technical reasons or because the permission was denied.
The fragment identifier of the URL has changed (the part of the URL after the #).
The value of an element changes or the content of an element with the attribute contenteditable is modified.
A submittable element has been checked and doesn't satisfy its constraints.
A key is pressed down and that key normally produces a character value (use input instead).
The level attribute has been updated.
A resource and its dependent resources have finished loading.
The first frame of the media has finished loading.
Progress has stopped (after "error", "abort" or "load" have been dispatched).
The spoken utterance reaches a named SSML "mark" tag.
A message is received through a WebSocket.
A message is received from a Web Worker.
A message is received from a child (i)frame or a parent window.
A message is received through an event source.
A message error is raised when a message is received by an object.
A message is received from a service worker, or a message is received in a service worker from another context.
A pointing device button (usually a mouse) is pressed on an element.
A pointing device is moved onto the element that has the listener attached.
A pointing device is moved off the element that has the listener attached.
A pointing device is moved over an element.
A pointing device is moved off the element that has the listener attached or off one of its children.
A pointing device is moved onto the element that has the listener attached or onto one of its children.
A pointing device button is released over an element.
The speech recognition service returns a final result with no significant recognition.
The browser has lost access to the network.
The browser has gained access to the network (but particular websites might be unreachable).
A WebSocket connection has been established.
An event source connection has been established.
The orientation of the device (portrait/landscape) has changed
A session history entry is being traversed from.
A session history entry is being traversed to.
Data has been transferred from the system clipboard to the document.
Playback has been paused.
The utterance is paused part way through.
The pointer is unlikely to produce any more events.
The pointer enters the active buttons state.
Pointing device is moved inside the hit-testing boundary.
Pointing device is moved out of the hit-testing boundary.
The pointer was locked or released.
It was impossible to lock the pointer for technical reasons or because the permission was denied.
The pointing device moved out of hit-testing boundary or leaves detectable hover range.
The pointing device is moved into the hit-testing boundary.
The pointer leaves the active buttons state.
Playback is ready to start after having been paused or delayed due to lack of data.
A session history entry is being navigated to (in certain cases).
The playback rate has changed.
The readyState attribute of a document has changed.
A SMIL animation element is repeated.
The document view has been resized.
The speech recognition service returns a result — a word or phrase has been positively recognized and this has been communicated back to the app.
The document view or an element has been scrolled.
A seek operation completed.
Some text is being selected.
The selection in the document has been changed.
A contextmenu event was fired on/bubbled to an element that has a contextmenu attribute
Any sound — recognisable speech or not — has stopped being detected.
Any sound — recognisable speech or not — has been detected.
Speech recognised by the speech recognition service has stopped being detected.
Sound that is recognised by the speech recognition service as speech has been detected.
The user agent is trying to fetch media data, but data is unexpectedly not forthcoming.
The speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current SpeechRecognition.
A request successfully completed.
Media data loading has been suspended.
Page loading has been stopped before the SVG was loaded.
An error has occurred before the SVG was loaded.
An SVG document has been loaded and parsed.
An SVG document is being resized.
An SVG document is being scrolled.
An SVG document has been removed from a window or frame.
An SVG document is being zoomed.
The time indicated by the currentTime attribute has been updated.
A touch point has been disrupted in an implementation-specific manners (too many touch points for example).
A touch point is removed from the touch surface.
A touch point is moved along the touch surface.
A touch point is placed on the touch surface.
The document or a dependent resource is being unloaded.
An attempt was made to open a database with a version number higher than its current version. A versionchange transaction has been created.
Fresh data is available from a proximity sensor (indicates whether the nearby object is near the device or not).
A versionchange transaction completed.
The content of a tab has become visible or has been hidden.
Playback has stopped because of a temporary lack of data.
A wheel button of a pointing device is rotated in any direction.
非标准事件
Event NameEvent TypeSpecificationFired when...
Mozilla Specific
A script has been executed.
Mozilla Specific
A script is about to be executed.
Chrome specific
A user is prompted to save a web site to a home screen on mobile.
Firefox OS specific
Firefox OS specific
This event is triggered each time a file is created, modified or deleted on a given storage area.
Firefox OS specific
The informations about the signal strength and the link speed have been updated.
Firefox OS specific
The call forwarding state changes.
Firefox OS specific
The MozMobileConnection.data object changes values.
Firefox OS specific
The MozMobileConnection.data object receive an error from the RIL.
Mozilla specific
The wheel button of a pointing device is rotated (detail attribute is a number of lines). (use
dragdrop
DragEvent
Mozilla specific
An element is dropped (use
dragexit
DragEvent
Mozilla specific
A drag operation is being ended(use
draggesture
DragEvent
Mozilla specific
The user starts dragging an element or text selection (use
The page has been localized using data-l10n-* attributes.
The wheel button of a pointing device is rotated.
Mozilla specific
The audio buffer is full and the corresponding raw samples are available.
Mozilla specific
A window is about to be resized.
Firefox OS Browser API-specific
Sent when some activity has been completed (complete description TBD.)
Firefox OS Browser API-specific
Sent when the scroll position within a browser changes.
Firefox OS Browser API-specific
Sent when audio starts or stops playing within the browser content.
Firefox OS Browser API-specific
Sent when the text selected inside the browser content changes.
Firefox OS Browser API-specific
Sent when window.close() is called within a browser .
Firefox OS Browser API-specific
Sent when a browser try to open a context menu.
Firefox OS Browser API-specific
Sent when a new paint occurs on any document in the browser .
Firefox OS Browser API-specific
Sent when an error occured while trying to load a content within a browser iframe
Firefox OS Browser API-specific
Sent when a search operation is performed on the browser content (see HTMLIFrameElement search methods.)
Firefox OS Browser API-specific
Sent when the paints content for the first time (this doesn't include the initial paint from about:blank.)
Firefox OS Browser API-specific
Sent when the favicon of a browser iframe changes.
Firefox OS Browser API-specific
Sent when an browser iframe's location changes.
Firefox OS Browser API-specific
Sent when the browser iframe has finished loading all its assets.
Firefox OS Browser API-specific
Sent when the browser iframe starts to load a new page.
Firefox OS Browser API-specific
Sent when a the path to the app manifest changes, in the case of a browser with an open web app embedded in it.
Firefox OS Browser API-specific
Sent when a elelment is added to, removed from or changed in the browser 's content.
Firefox OS Browser API-specific
Sent when a link to a search engine is found.
Firefox OS Browser API-specific
Sent when a new tab is opened within a browser as a result of the user issuing a command to open a link target in a new tab (for example ctrl/cmd + click.)
Firefox OS Browser API-specific
Sent when window.open() is called within a browser iframe.
Firefox OS Browser API-specific
Sent when the browser 's window size has changed.
Firefox OS Browser API-specific
Sent when the browser content scrolls.
Firefox OS Browser API-specific
Sent when the available scrolling area in the browser changes. This can occur on resize and when the page size changes (while loading for example.)
Firefox OS Browser API-specific
Sent when asynchronous scrolling (i.e. APCZ) starts or stops.
Firefox OS Browser API-specific
Sent when the SSL state changes within a browser iframe.
Firefox OS Browser API-specific
Sent when the text selected inside the browser content changes. Note that this is deprecated, and newer implementations use
Firefox OS Browser API-specific
Sent when alert(), confirm() or prompt() are called within a browser iframe
Firefox OS Browser API-specific
Sent when the document.title changes within a browser iframe.
Firefox OS Browser API-specific
Sent when an HTTP authentification is requested.
Firefox OS Browser API-specific
Sent when the visibility state of the current browser iframe changes, for example due to a call to setVisible().
To be specified
A gamepad button is pressed down.
To be specified
A gamepad button is released.
Mozilla specific
The wheel button of a pointing device is rotated (detail attribute is a number of pixels). (use wheel instead)
Mozilla specific
Fresh data is available from an orientation sensor (see deviceorientation).
Mozilla specific
The document view has been scrolled or resized.
Mozilla specific
The time of the device has been changed.
Mozilla specific
A touch point is placed on the touch surface (use touchstart instead).
Mozilla specific
A touch point is moved along the touch surface (use touchmove instead).
Mozilla specific
A touch point is removed from the touch surface (use touchend instead).
To be specified
The correspondent is being alerted (his/her phone is ringing).
To be specified
The line of the correspondent is busy.
To be specified
A call has been added or removed from the list of current calls.
To be specified
A call has been connected.
To be specified
A call is about to connect.
To be specified
An SMS has been successfully delivered.
To be specified
The number of a correspondent has been dialed.
Firefox OS specific
Wifi has been disabled on the device.
To be specified
A call has been disconnected.
To be specified
A call is about to disconnect.
Firefox OS specific
Wifi has been enabled on the device.
To be specified
An error occurred.
To be specified
A call has been held.
To be specified
A call is about to be held.
To be specified
A call is being received.
To be specified
An SMS has been received.
To be specified
A call is about to resume.
To be specified
An SMS has been sent.
To be specified
The state of a call has changed.
Firefox OS specific
The status of the Wifi connection changed.
Mozilla specific
An element has been overflowed by its content or has been rendered for the first time in this state (only works for elements styled with overflow != visible).
Mozilla specific
A smartcard has been inserted.
Mozilla specific
A smartcard has been removed.
Firefox OS specific
The STK Proactive Command is issued from ICC.
Firefox OS specific
The STK Session is terminated by ICC.
Mozilla specific
An element is no longer overflowed by its content (only works for elements styled with overflow != visible).
uploadprogress
Mozilla Specific
Upload is in progress (see
Firefox OS specific
A new USSD message is received
Firefox OS specific
The MozMobileConnection.voice object changes values.
Microsoft specific
Microsoft specific
Mozilla 特定事件
注意:这些事件不会暴露给 Web 内容使用,只能在 chrome 内容的上下文中使用。
XUL 事件
Event NameEvent TypeSpecificationFired when...
An observer noticed a change to the attributes of a watched broadcaster.
XUL
The state of a checkbox has been changed either by a user action or by a script (useful for accessibility).
XUL
The close button of the window has been clicked.
XUL
An element has been activated.
XUL
A command update occurred on a commandset element.
XUL
A menu or menuitem has been hovered or highlighted.
XUL
A menu or menuitem is no longer hovered or highlighted.
PopupEvent
A menupopup, panel or tooltip has been hidden.
PopupEvent
A menupopup, panel or tooltip is about to be hidden.
PopupEvent
A menupopup, panel or tooltip is about to become visible.
PopupEvent
A menupopup, panel or tooltip has become visible.
XUL
The state of a radio has been changed either by a user action or by a script (useful for accessibility).
XUL
The value of an element has changed (a progress bar for example, useful for accessibility).
附加组件特定事件
Event NameEvent TypeSpecificationFired when...
Addons specific
A touch point is swiped across the touch surface
Addons specific
Two touch points start to move away from each other.
Addons specific
Two touch points move away from each other (after a MozMagnifyGestureStart).
Addons specific
Two touch points moved away from each other (after a sequence of MozMagnifyGestureUpdate).
Addons specific
Two touch points start to rotate around a point.
Addons specific
Two touch points rotate around a point (after a MozRotateGestureStart).
Addons specific
Two touch points rotate around a point (after a sequence of MozRotateGestureUpdate).
Addons specific
Two touch points are tapped on the touch surface.
Addons specific
A "press-tap" gesture happened on the touch surface (first finger down, second finger down, second finger up, first finger up).
Addons specific
A touch point is swiped across the touch surface to invoke the edge UI (Win8 only).
Addons specific
Content has been repainted.
Addons specific
A popup has been blocked
Addons specific
A window has been created.
Addons specific
A window is about to be closed.
Addons specifc
The title of a window has changed.
Addons specifc
A link has been added a document.
Addons specifc
A link has been removed inside from a document.
Addons specific
A meta element has been added to a document.
Addons specific
A meta element has been removed from a document.
Addons specific
A modal dialog is about to open.
Addons specific
A modal dialog has been closed.
Addons specific
The content of an element has been auto-completed.
Addons specific
The frame has finished loading (but not its dependent resources).
Addons specific
A
Addons specific
A
Addons specific
Browser fullscreen mode has been entered or left.
Addons specific
Window has entered/left fullscreen mode, or has been minimized/unminimized.
Addons specific
DOM fullscreen mode has been entered.
Addons specific
The session store will stop tracking this window.
Addons specific
The session store will stop tracking this tab.
Addons specific
A tab is about to be restored.
Addons specific
A tab has been restored.
Addons specific
A window state has switched to "ready".
Addons specific
A window state has switched to "busy".
Addons specific
A tab has been opened.
Addons specific
A tab has been closed.
Addons specific
A tab has been selected.
Addons specific
A tab has been shown.
Addons specific
A tab has been hidden.
Addons specific
A tab has been pinned.
Addons specific
A tab has been unpinned.
开发者工具特定事件
Event NameEvent TypeSpecificationFired when...
devtools specific
The "Rules" view of the style inspector has been updated.
devtools specific
The "Rules" view of the style inspector has been changed.
devtools specific
A link to a CSS file has been clicked in the "Rules" view of the style inspector.