This example is for touch devices only.
<!DOCTYPE html> <html> <body> <p ontouchcancel="myFunction()"> Touch this paragraph while you do something that will interrupt the event. </p> <p id="demo"></p> <script> function myFunction() {/*from ww w . j a va2 s . c o m*/ document.getElementById("demo").innerHTML = "Touch Cancelled"; } </script> </body> </html>
Bubbles: | Yes |
---|---|
Cancelable: | Yes |
Event type: | TouchEvent |
Supported HTML tags: | All HTML elements |