--- 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>