How to impliment a onmousedown and onmouseup on a touch screen iphone

≯℡__Kan透↙ 提交于 2019-11-27 23:33:23

The equivalent for onmousedown on touchscreen devices is ontouchstart, and the equivalent of onmouseup is ontouchend.

If you would also like to detect dragging, you could use ontouchmove which is fired every time you move your finger after touching the screen.

You might be interested in onpointerup and onpointerdown events which will work on both touch and non touch devices. Check browser support

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!