TouchList

TouchList 接口代表一个触摸平面上所有触点的列表。例如,如果一个用户用三根手指接触屏幕(或者触控板),与之对应的 TouchList 会包含每根手指的 Touch 对象,总共三个。

属性

TouchList.length 只读
返回TouchListTouch 对象的数量。

方法

TouchList.identifiedTouch()
列表中标示符与指定值匹配的第一个Touch 对象会被返回。
TouchList.item()
返回列表中以指定值作为索引的 Touch 对象。

示例

参考这个主要Touch事件的示例.

规范

Specification Status Comment
Touch Events – Level 2 Draft Non-stable version.
Touch Events Recommendation Initial definition.

浏览器兼容

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
TouchListChrome Full support 18Edge Full support YesFirefox Full support 52
Full support 52
No support 18 — 24
IE No support NoOpera Full support 15Safari No support NoWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 6Opera Android Full support 14Safari iOS Full support YesSamsung Internet Android ?
identifiedTouch
DeprecatedNon-standard
Chrome ? Edge ? Firefox ? IE No support NoOpera ? Safari No support NoWebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
itemChrome Full support 18Edge Full support YesFirefox Full support 52
Full support 52
No support 18 — 24
IE No support NoOpera Full support 15Safari No support NoWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 6Opera Android Full support 14Safari iOS Full support YesSamsung Internet Android ?
lengthChrome Full support 18Edge Full support YesFirefox Full support 52
Full support 52
No support 18 — 24
IE No support NoOpera Full support 15Safari No support NoWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 6Opera Android Full support 14Safari iOS Full support YesSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.

相关链接