touchcancel 觸控點發生失效的事件被觸發(例如太多觸控點時)
一般資訊
- 規範
- Touch Events
- 介面
- TouchEvent
- 起泡事件
- 是
- 可取消
- 否
- 對象
- Document, Element
- 預設行為
- 無
屬性
Property | Type | Description |
---|---|---|
target Read only |
EventTarget | The event target (the topmost target in the DOM tree). |
type Read only |
DOMString | The type of event. |
bubbles Read only |
Boolean | Whether the event normally bubbles or not. |
cancelable Read only |
Boolean | Whether the event is cancellable or not. |
view Read only |
WindowProxy | document.defaultView (window of the document) |
detail Read only |
long (float) | 0. |
touches Read only |
TouchList | A list of Touch es for every point of contact currently touching the surface. |
targetTouches Read only |
TouchList | A list of Touch es for every point of contact that is touching the surface and started on the element that is the target of the current event. |
changedTouches Read only |
TouchList | A list of Touch es for every point of contact which contributed to the event.For the touchstart event this must be a list of the touch points that just became active with the current event. For the touchmove event this must be a list of the touch points that have moved since the last event. For the touchend and touchcancel events this must be a list of the touch points that have just been removed from the surface. |
ctrlKey Read only |
boolean | true if the control key was down when the event was fired. false otherwise. |
shiftKey Read only |
boolean | true if the shift key was down when the event was fired. false otherwise. |
altKey Read only |
boolean | true if the alt key was down when the event was fired. false otherwise. |
metaKey Read only |
boolean | true if the meta key was down when the event was fired. false otherwise. |
範例
各種觸控事件的範例:Touch events。
瀏覽器相容性
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 22.0 | 18.0 (18.0) | No support | No support | No support |
Feature | Android | Android Webview | Chrome for Android | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | (Yes) | 6.0 (6.0) | (Yes) | 11 | (Yes) | (Yes) |