跳到主要内容

事件属性(Events Attributes)

共计 88 个事件属性(on*)

  • Event
    • UIEvent
      • FocusEvent
      • InputEvent
      • MouseEvent
        • PointerEvent
        • WheelEvent
      • KeyboardEvent
      • CompositionEvent
    • CustomEvent
  • EventTarget
  • EventListener

UIEvent

事件属性(Attribute)说明(Description)事件(Event)接口(Interface)
onload-loadUIEvent
onunload-unloadUIEvent
--abortUIEvent
onerror-errorUIEvent
onselect-selectUIEvent

FocusEvent

事件属性(Attribute)说明(Description)事件(Event)接口(Interface)
onblur-blurFocusEvent
onfocus-focusFocusEvent
--focusinFocusEvent
--focusoutFocusEvent

InputEvent

事件属性(Attribute)说明(Description)事件(Event)接口(Interface)
onbeforeinput-beforeinputInputEvent
oninput-inputInputEvent

MouseEvent

事件属性(Attribute)说明(Description)事件(Event)接口(Interface)
ondblclick-dblclickMouseEvent
onmousedown-mousedownMouseEvent
onmouseenter-mouseenterMouseEvent
onmouseleave-mouseleaveMouseEvent
onmousemove-mousemoveMouseEvent
onmouseout-mouseoutMouseEvent
onmouseover-mouseoverMouseEvent
onmouseup-mouseupMouseEvent

PointerEvent

事件属性(Attribute)说明(Description)事件(Event)接口(Interface)
onauxclick-auxclickPointerEvent
onclick-clickPointerEvent
oncontextmenu-contextmenuPointerEvent

WheelEvent

事件属性(Attribute)说明(Description)事件(Event)接口(Interface)
onwheel-wheelWheelEvent

KeyboardEvent

事件属性(Attribute)说明(Description)事件(Event)接口(Interface)
onkeydown-keydownKeyboardEvent
onkeypress-keypressKeyboardEvent
onkeyup-keyupKeyboardEvent

CompositionEvent

事件属性(Attribute)说明(Description)事件(Event)接口(Interface)
--compositionstartCompositionEvent
--compositionupdateCompositionEvent
--compositionendCompositionEvent

body elements

事件属性(Attribute)说明(Description)事件(Event)目标对象(target)接口(Interface)
--loadWindowEvent
--blurWindowEvent
--focusWindowEvent
onbeforeprint-beforeprintWindowEvent
onafterprint-afterprintWindowEvent
onmessage-messageWindowMessageEvent
onmessageerror-messageerrorWindowMessageEvent
onpageshow-pageshowWindowPageTransitionEvent
onpagehide-pagehideWindowPageTransitionEvent
onpageswap-pageswapWindowPageSwapEvent
onpagereveal-pagerevealWindowPageRevealEvent
onbeforeunload-beforeunloadWindowBeforeUnloadEvent
onunload-unloadWindowBeforeUnloadEvent
onstorage-storageWindowStorageEvent
onpopstate-popstateWindowPopStateEvent
onhashchange-hashchangeWindowHashChangeEvent
onerror-errorGlobal scope objectsEvent/ErrorEvent
ononline-onlineGlobal scope objectsEvent
onoffline-offlineGlobal scope objectsEvent
onlanguagechange-languagechangeGlobal scope objectsEvent
onrejectionhandled-rejectionhandledGlobal scope objectsPromiseRejectionEvent
onunhandledrejection-unhandledrejectionGlobal scope objectsPromiseRejectionEvent

HTML elements

事件属性(Attribute)说明(Description)事件(Event)目标对象(target)接口(Interface)
onbeforematch-beforematchElementsEvent
onbeforetoggle-beforetoggleElementsToggleEvent
onchange-changeForm controlsEvent
onselect-selectForm controlsEvent
oninvalid-invalidForm controlsEvent
onreset-resetform elementsEvent
onsubmit-submitform elementsSubmitEvent
onformdata-formdataform elementsFormDataEvent
oncancel-cancelinput elementsEvent
oncontextlost-contextlostcanvas elementsEvent
oncontextrestored-contextrestoredcanvas elementsEvent
oncancel-canceldialog elementsEvent
onclose-closedialog elementsEvent
ontoggle-toggledetails and popover elementsToggleEvent
onloadstart-loadstartaudio and video elementsEvent
onloadedmetadata-loadedmetadataaudio and video elementsEvent
onloadeddata-loadeddataaudio and video elementsEvent
onprogress-progressaudio and video elementsEvent
onsuspend-suspendaudio and video elementsEvent
--abortaudio and video elementsEvent
onerror-erroraudio and video elementsEvent
onemptied-emptiedaudio and video elementsEvent
onstalled-stalledaudio and video elementsEvent
oncanplay-canplayaudio and video elementsEvent
oncanplaythrough-canplayaudio and video elementsEvent
onplaying-canplayaudio and video elementsEvent
onwaiting-canplayaudio and video elementsEvent
onseeking-canplayaudio and video elementsEvent
onseeked-canplayaudio and video elementsEvent
onended-canplayaudio and video elementsEvent
ondurationchange-canplayaudio and video elementsEvent
ontimeupdate-canplayaudio and video elementsEvent
onplay-canplayaudio and video elementsEvent
onpause-canplayaudio and video elementsEvent
onratechange-canplayaudio and video elementsEvent
onresize-canplayaudio and video elementsEvent
onvolumechange-canplayaudio and video elementsEvent
onerror-errorsource elementsEvent
oncuechange-cuechangetrack elementsEvent
onload-loadtrack elementsEvent
onerror-errortrack elementsEvent
onslotchange-slotchangeslot elements / ShadowRootEvent
ondragstart-dragstartdrag-and-dropDragEvent
ondrag-dragdrag-and-dropDragEvent
ondragenter-dragenterdrag-and-dropDragEvent
ondragleave-dragleavedrag-and-dropDragEvent
ondragover-dragoverdrag-and-dropDragEvent
ondrop-dropdrag-and-dropDragEvent
ondragend-dragenddrag-and-dropDragEvent
oncopy-copyClipboard APIClipboardEvent
oncut-cutClipboard APIClipboardEvent
onpaste-pasteClipboard APIClipboardEvent
onresize-resizeVisualViewportEvent
onscroll-scrollVisualViewportEvent
onscrollend-scrollendVisualViewportEvent
onsecuritypolicyviolation-securitypolicyviolationContent Security Policy (CSP)SecurityPolicy
ViolationEvent

参考