手机中的js事件

时间:2023-03-09 22:39:04
手机中的js事件
// 手势事件
touchstart //当手指接触屏幕时触发
touchmove //当已经接触屏幕的手指开始移动后触发
touchend //当手指离开屏幕时触发
touchcancel // 触摸事件
gesturestart //当两个手指接触屏幕时触发
gesturechange //当两个手指接触屏幕后开始移动时触发
gestureend // 屏幕旋转事件
onorientationchange // 检测触摸屏幕的手指何时改变方向
orientationchange // touch事件支持的相关属性
touches
targetTouches
changedTouches
clientX    // X coordinate of touch relative to the viewport (excludes scroll offset)
clientY    // Y coordinate of touch relative to the viewport (excludes scroll offset)
screenX    // Relative to the screen
screenY    // Relative to the screen
pageX     // Relative to the full page (includes scrolling)
pageY     // Relative to the full page (includes scrolling)
target     // Node the touch event originated from
identifier   // An identifying number, unique to each touch event