Sự kiện cảm ứng DOM DOM
❮ Sự kiện DOM ❮ Đối tượng sự kiện
Đối tượng TouchEvent
Đối tượng TouchEvent xử lý các sự kiện xảy ra khi người dùng chạm vào thiết bị cảm ứng.
Sự kiện chạm
Event | Occurs When |
---|---|
ontouchcancel | A touch is interrupted |
ontouchend | A finger is removed from a touch screen |
ontouchmove | A finger is dragged across the screen |
ontouchstart | A finger is placed on a touch screen |
Thuộc tính sự kiện chạm
Property | Returns |
---|---|
altKey | If the ALT key was pressed when the event was triggered |
changedTouches | A list of the touch objects whose state changed between this and the previous touch |
ctrlKey | If the CTRL key was pressed when the event was triggered |
metaKey | If the META key was pressed when the event was triggered |
shiftKey | If the SHIFT key was pressed when the event was triggered |
targetTouches | A list of the touch objects that are in contact with the surface and where the touchstart event occured on the same target element as the current target element |
touches | A list of the touch objects that are currently in contact with the surface |
Thuộc tính và phương thức kế thừa
TouchEvent kế thừa tất cả các thuộc tính và phương thức từ: