x
 
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<body ontouchstart="countTouches(event)" ontouchend="countTouches(event)">
<h1>TouchEvent touches 属性</h1>
<p>请触摸此页面上的任意元素。</p>
<p>当前触摸此文档的手指数量为 <span id="demo">0</span></p>
<p>touches 属性返回一组触摸对象,当前触摸文档的每个手指对应一个触摸对象。</p>
<p><b>注释:</b>触摸事件仅适用于触摸设备。</p>
<script>
function countTouches(event) {
  var x = event.touches.length;
  document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>