Đối tượng sự kiện HTML DOM
Đối tượng sự kiện
Khi một sự kiện xảy ra trong HTML, sự kiện đó thuộc về một đối tượng sự kiện nhất định, giống như sự kiện nhấp chuột thuộc đối tượng MouseEvent.
Để có hướng dẫn về Sự kiện, hãy đọc Hướng dẫn về Sự kiện JavaScript của chúng tôi .
Đối tượng sự kiện
Tất cả các đối tượng sự kiện đều dựa trên Đối tượng sự kiện và kế thừa tất cả các thuộc tính và phương thức của chúng
Event Object | Description |
---|---|
Event | The parent of all event objects |
Các đối tượng sự kiện khác
Đây là những đối tượng sự kiện phổ biến nhất:
Event Object | Description |
---|---|
AnimationEvent | For CSS animations |
ClipboardEvent | For modification of the clipboard |
DragEvent | For drag and drop interaction |
FocusEvent | For focus-related events |
HashChangeEvent | For changes in the anchor part of the URL |
InputEvent | For user input |
KeyboardEvent | For keyboard interaction |
MouseEvent | For mouse interaction |
PageTransitionEvent | For navigating to, and away from, web pages |
PopStateEvent | For changes in the history entry |
ProgressEvent | For the progress of loading external resources |
StorageEvent | For changes in the window's storage area. |
TouchEvent | For touch interaction |
TransitionEvent | For CSS transitions |
UiEvent | For user interface interaction |
WheelEvent | For mousewheel interaction |