HTML DOM 터치 이벤트
TouchEvent 객체
사용자가 터치 기반 장치를 터치할 때 발생하는 이벤트는 TouchEvent 객체에 속합니다.
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 |
상속된 속성 및 메서드
TouchEvent는 다음에서 모든 속성과 메서드를 상속합니다.
이벤트 유형
다음 이벤트 유형은 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 |