This example is for touch devices only.
<!DOCTYPE html> <html> <body> <p ontouchmove="myFunction()"> Touch this paragraph, and move the finger to trigger a function that will write "Hello World".</p> <p id="demo"></p> <script> function myFunction() {// w ww . j ava2 s . c o m document.getElementById("demo").innerHTML = "Hello World"; } </script> </body> </html>
Bubbles: | Yes |
---|---|
Cancelable: | Yes |
Event type: | TouchEvent |
Supported HTML tags: | All HTML elements |