onmouseup

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

≯℡__Kan透↙ 提交于 2019-11-27 23:33:23
I've very new to HTML/Java but am learning... I want to develop a button on an iphone that runs a java script command when press and when it is released. I've done this find using onmousedown and onmouseup attributes, but this does not work the same. could someone please point me in the right direction as to how to do this same thing on the iphone? 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