1, Touch Event Introduction The Web page mouse on the PC produces onmousedown, onmouseup, onmouseout, onmouseover, onmousemove events, but on mobile devices such as iphone, ipod Touch, The Ontouchstart, Ontouchmove, Ontouchend, Ontouchcancel events are generated when the Web page on the ipad touches the screen, corresponding to the touch screen start, drag and finish, and the touch screen event and cancellation. When the finger is pressed, the ontouchstart is triggered, the ontouchmove is triggered when the finger is moved, and the ontouchend is triggered when the finger is removed. When some higher-level events occur (such as phone access or pop-up messages), the current touch operation is triggered, triggering ontouchcancel. The game, archive, and so on are usually paused during ontouchcancel. 2. Touch event and mouse event starting relationship after touch screen operation, the moment when the finger is lifted (i.e. after ontouchend), the system will determine whether the content of the element receiving the event has been changed, if the content is changed, the next event will not be triggered, if not changed, Events are triggered in the order of Mousedown,mouseup,click. In particular, the Mouseout event of the previous event is triggered only if a touch-screen event is triggered again.
Mobile-Touch Events Ontouchstart, Ontouchmove, Ontouchend, Ontouchcancel