1. touches: A list of information for every finger currently touching the screen
2. targetTouches: Like touches, but is filtered to only the information for finger touches that started out within the same node
3. changedTouches: A list of information for every finger involved in the event (see below) To better understand what might be in these lists, let’s go over some examples quickly

They vary in the following pattern:
1. When I put a finger down, all three lists will have the same information. It will be in changedTouches because putting the finger down is what caused the event.
  第一根手指触摸屏幕,三个事件获取的值相同。

2. When I put a second finger down, touches will have two items, one for each finger. targetTouches will have two items only if the finger was placed in the same node as the first finger. changedTouches will have the information related to the second finger, because it’s what caused the event
  第二根手指触摸屏幕,此时touches获取两个触摸点的信息。若触摸点在同一个对象上,targetTouches也获取两个触摸点的信息。changedTouches只保存第二个触摸点的信息。

3. If I put two fingers down at exactly the same time, it’s possible to have two items in changedTouches, one for each finger
  若同时用两根手指触摸屏幕,changedTouches 有两个列表分别表示两个触摸点的信息。

4. If I move my fingers, the only list that will change is changedTouches and will contain information related to as many fingers as have moved (at least one)
  如果移动触摸点,只有 changedTouches 会记录每个移动的触摸点信息

5. When I lift a finger, it will be removed from touches, targetTouches and will appear in changedTouches since it’s what caused the event
  当一个触摸点离开,它的信息列表将从touches,targetTouches移除,但是changedTouches会保存此触摸点信息。

6. Removing my last finger will leave touches and targetTouches empty, and changedTouches will contain information for the last finger
  最后一个触摸点离开,touchestargetTouches变成空值,而 changedTouches保存着最后一个离开的触摸点信息。

参考地址:

  http://stackoverflow.com/questions/7056026/variation-of-e-touches-e-targettouches-and-e-changedtouches

touches, targetTouches, changedTouches 区别的更多相关文章

  1. 关于TouchEvent里面的touches,targetTouches,changedTouches的解释

    touches:手指触摸到屏幕上引起的当前所有触摸点的集合; targetTouches:手指触摸到绑定事件的节点上的触摸点的集合; changedTouches:触摸事件时改变触摸点的集合;  以下 ...

  2. js中触摸相关变量touches,targetTouches和changedTouches的区别

    touches: 当前屏幕上所有触摸点的列表; targetTouches: 当前对象上所有触摸点的列表; changedTouches: 涉及当前事件的触摸点的列表 通过一个例子来区分一下触摸事件中 ...

  3. TouchEvent里的targetTouches、touches、changedTouches的区别的具体体现是?

    touches:当前屏幕上所有触摸点的集合列表 targetTouches: 绑定事件的那个结点上的触摸点的集合列表 changedTouches: 触发事件时改变的触摸点的集合 举例来说,比如div ...

  4. Touch事件详解及区别,触屏滑动距离计算

    移动端有四个关于触摸的事件,分别是touchstart.touchmove.touchend.touchcancel(比较少用), 它们的触发顺序是touchstart-->touchmove- ...

  5. html5手机常见问题与工具分享

    mobileTech A useful tools or tips list for mobile web application developing 这个项目收集移动端开发所需要的一些资源与小技巧 ...

  6. HTML5的touch事件

    HTML5中新添加了很多事件,但是由于他们的兼容问题不是很理想,应用实战性不是太强,所以在这里基本省略,咱们只分享应用广泛兼容不错的事件,日后随着兼容情况提升以后再陆续添加分享.今天为大家介绍的事件主 ...

  7. (任寒韬)WebApp群主 - MobileTech 资料

    web app : http://www.lightapp.cn/brand/index/4101 https://github.com/jtyjty99999/mobileTech/blob/mas ...

  8. webAPP前端必备知识

    了解各浏览器内核 Firefox:-moz-box-shadow Safari:-webkit-box-shadow Opera:-o-box-shadow IE:-ms-box-shadow Web ...

  9. 转。webapp开发小tips

     备忘 - Q:  webapp点击一个按钮调用系统拨号: <a href="tel:12345654321">打电话给我</a> <a href=& ...

随机推荐

  1. Creating Classes 创建类

    The dojo/_base/declare module is the foundation of class creation within the Dojo Toolkit. declare a ...

  2. servlet简单用法和配置示例及说明

    学习原因和目的:   我如今所接触的项目都是bs模式的web应用,而里边基本上都是用的spring MVC和前台交互,servlet貌似用的很少.   但是即便是用spring和spring MVC, ...

  3. MFC ADO连接Sql Server数据库报无效指针的问题

    相关症状:  Win7sp1上编译的ADO程序无法在低版本系统上运行,创建ADO时提示错误:0x80004002 解决办法如下:  1.下载:  http://download.microsoft.c ...

  4. OAF_开发系列11_实现OAF通过DataBoundValues动态显示表列的左右对齐

    20150712 Created By BaoXinjian

  5. IBM Power PC安装sysbench 执行mysql基准测试 --- sysbench安装

    第一步:下载Sysbench http://dev.mysql.com/downloads/benchmarks.html 第二步:解压sysbench 第三步:执行安装步骤 1. ./autogen ...

  6. Java基础知识:代理

    一.代理的概念 动态代理技术是整个java技术中最重要的一个技术,它是学习java框架的基础,不会动态代理技术,那么在学习Spring这些框架时是学不明白的. 动态代理技术就是用来产生一个对象的代理对 ...

  7. I prefer fcitx

    sudo add-apt-repository ppa:fcitx-team/nightly sudo apt-get update Then, you should install Fcitx.Fc ...

  8. mac-android-虚机加速

    mac下进行android编程不可避免会碰到android虚拟机问题,macbook pro启动虚机时报错: Starting emulator for AVD 'NEW' emulator: ERR ...

  9. ShellExecute 使用方法

    ShellExecute的功能是运行一个外部程序(或者是打开一个已注册的文件.打开一个目录.打印一个文件等等),并对外部程序有一定的控制. 有几个API函数都可以实现这些功能,但是在大多数情况下She ...

  10. 使用 Google Web Fonts

    Google Fonts 的介绍:Google Fonts 并不是简单的字体下载站 Google Fonts 地址:https://www.google.com/fonts 左上角可以输入查找的字体名 ...