HTML DOM TouchEvent
❮ Sự kiện DOM ❮ Đối tượng sự kiện
Đối tượng TouchEvent
Các sự kiện xảy ra khi người dùng chạm vào thiết bị dựa trên cảm ứng, thuộc về Đối tượng TouchEvent.
Thuộc tính và phương pháp TouchEvent
Property/Method | Description |
---|---|
altKey | Returns whether the "ALT" key was pressed when the touch event was triggered |
changedTouches | Returns a list of all the touch objects whose state changed between the previous touch and this touch |
ctrlKey | Returns whether the "CTRL" key was pressed when the touch event was triggered |
metaKey | Returns whether the "meta" key was pressed when the touch event was triggered |
shiftKey | Returns whether the "SHIFT" key was pressed when the touch event was triggered |
targetTouches | Returns a list of all 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 | Returns a list of all 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ừ:
Các loại sự kiện
Các loại sự kiện này thuộc về Đối tượng TouchEvent:
Event | Description |
---|---|
ontouchcancel | The event occurs when the touch is interrupted |
ontouchend | The event occurs when a finger is removed from a touch screen |
ontouchmove | The event occurs when a finger is dragged across the screen |
ontouchstart | The event occurs when a finger is placed on a touch screen |
❮ Sự kiện DOM ❮ Đối tượng sự kiện