วัตถุเหตุการณ์ HTML DOM
วัตถุกิจกรรม
เมื่อเหตุการณ์เกิดขึ้นใน HTML เหตุการณ์จะเป็นของวัตถุเหตุการณ์บางอย่าง เช่น เหตุการณ์การคลิกเมาส์จะเป็นของวัตถุ MouseEvent
สำหรับบทช่วยสอนเกี่ยวกับเหตุการณ์ โปรดอ่าน บทช่วย สอนกิจกรรม JavaScriptของ เรา
วัตถุเหตุการณ์
ออบเจ็กต์เหตุการณ์ทั้งหมดอิงตามออบเจ็กต์เหตุการณ์ และสืบทอดคุณสมบัติและวิธีการทั้งหมด
Event Object | Description |
---|---|
Event | The parent of all event objects |
วัตถุกิจกรรมอื่น ๆ
เหล่านี้เป็นวัตถุเหตุการณ์ที่พบบ่อยที่สุด:
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 |