简体   繁体   中英

Where can I find a list of possible events for an HTML element?

I'd like to know the possible events that can come from an HTML span element. Is there some documentation somewhere for each HTML element that says what events it can trigger and how?

The list below is the closest that I have found.. Not sure if it covers all of them!! Notice that there is no onChange event handler for the span tag. Instead, you will have to use the MutationObserver to watch for changes being made to the DOM tree.

+----------------+--------------------------------------------------------------+
| Event          |onActivate                      onAfterUpdate                 |
| Handlers       |onBeforeActivate                onBeforeCopy                  |
|                |onBeforeCut                     onBeforeDeactivate            |
|                |onBeforeEditFocus               onBeforePaste                 |
|                |onBeforeUpdate                  onBlur                        |
|                |onClick                         onContextMenu                 |
|                |onControlSelect                 onCopy                        |
|                |onCut                           onDblClick                    |
|                |onDeactivate                    onDrag                        |
|                |onDragEnd                       onDragEnter                   |
|                |onDragLeave                     onDragOver                    |
|                |onDragStart                     onDrop                        |
|                |onErrorUpdate                   onFilterChange                |
|                |onFocus                         onFocusIn                     |
|                |onFocusOut                      onHelp                        |
|                |onKeyDown                       onKeyPress                    |
|                |onKeyUp                         onLoseCapture                 |
|                |onMouseDown                     onMouseEnter                  |
|                |onMouseLeave                    onMouseMove                   |
|                |onMouseOut                      onMouseOver                   |
|                |onMouseUp                       onMouseWheel                  |
|                |onMove                          onMoveEnd                     |
|                |onMoveStart                     onPaste                       |
|                |onPropertyChange                onReadyStateChange            |
|                |onResize                        onResizeEnd                   |
|                |onResizeStart                   onSelectStart                 |
|                |onTimeError                                                   |
+----------------+--------------------------------------------------------------+

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM