First, touch events
Basic events:
Touchstart//trigger when finger just touches the screen
Touchmove//trigger when the finger moves on the screen
Touchend//trigger when the finger moves away from the screen
Here's less of a comparison:
Trigger when touchcancel//touch process is canceled by the system
Each event has the following list, such as Touchend's targettouches of course 0:
Touches//List of all fingers on the screen
Targettouches//List of all fingers located on this element
Changedtouches//List of all fingers involved in the current event
Each event has a list, and each list has the following properties:
Copy Code
Where coordinates are commonly used Pagex,pagey:
PageX//Relative to the X-coordinate of the page
Pagey//Relative to the Y-coordinate of the page
ClientX//X-coordinate relative to viewport
ClientY//Y coordinate relative to the viewport
ScreenX//Relative to the X-coordinate of the screen
ScreenY//Relative to the Y-coordinate of the screen
Identifier//Unique number of the current touch point
Target//The DOM element that the finger touches
Other related events:
Event.preventdefault ()//block browser zoom, scroll bar scrolling when touch is blocked
var Supporttouch = "Createtouch" in document//To determine if touch events are supported
Mobile-commonly used touch events and common coordinates