touch事件小结

原文:http://zhuxinyong.com/2016/03/08/touch%E4%BA%8B%E4%BB%B6%E5%B0%8F%E7%BB%93/
目前支持良好的三种触摸事件:1. touchstart 2. touchmove 3. touchend。

ToucheEvent -> TouchList -> Touch
触摸事件属性(TouchEvent):
Represents an event that occurs when the state of touches on the surface changes.

触摸事件列表(TouchList):

Represents a group of touches; this is used when the user has, for example, multiple fingers on the surface at the same time.

  • touches 当前位于屏幕上的所有手指动作的列表。

  • targetTouches 位于当前 DOM 元素上的手指动作的列表

  • changedTouches 涉及当前事件的手指动作的列表。例如,在一个 touchend 事件中,这将是移开手指
    触摸事件(Touch):

Represents a single point of contact between the user and the touch surface.

位置信息:

  • clientX/Y

  • pageX/Y

  • screenX/y
    这些信息可以判断拖动的方向(下拉刷新/上拉加载)。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值