aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/touchlist/index.html
blob: 36a063b8e16c0646b7c19d181116cfe82d0d2289 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
title: TouchList
slug: Web/API/TouchList
tags:
  - API
  - DOM
  - Mobile
translation_of: Web/API/TouchList
---
<p>{{ ApiRef("Touch Events") }}</p>

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

<h2 id="属性">属性</h2>

<dl>
 <dt>{{ domxref("TouchList.length") }} {{readonlyInline}}</dt>
 <dd>返回<code>TouchList</code>{{ domxref("Touch") }} 对象的数量。</dd>
</dl>

<h2 id="方法">方法</h2>

<dl>
 <dt>{{ domxref("TouchList.identifiedTouch()") }}{{obsolete_inline}}</dt>
 <dd>列表中标示符与指定值匹配的第一个{{ domxref("Touch") }} 对象会被返回。</dd>
 <dt>{{ domxref("TouchList.item()") }}</dt>
 <dd>返回列表中以指定值作为索引的 {{ domxref("Touch") }} 对象。</dd>
</dl>

<h2 id="示例">示例</h2>

<p>参考这个<a href="/en/DOM/Touch_events#Example" title="en/DOM/Touch events#Example">主要Touch事件的示例</a>.</p>

<h2 id="规范">规范</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('Touch Events 2','#touchlist-interface')}}</td>
   <td>{{Spec2('Touch Events 2')}}</td>
   <td>Non-stable version.</td>
  </tr>
  <tr>
   <td>{{SpecName('Touch Events', '#touchlist-interface')}}</td>
   <td>{{Spec2('Touch Events')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="浏览器兼容">浏览器兼容</h2>

<p>{{Compat("api.TouchList")}}</p>

<h2 id="相关链接">相关链接</h2>

<ul>
 <li><a href="/en/DOM/Touch_events" title="en/DOM/Touch events">Touch 事件</a></li>
 <li>{{domxref("Document.createTouchList()")}}</li>
</ul>