![]() |
VOOZH | about |
The touchstart event is used to execute a script whenever the user touches an HTML element. On touching a particular element, if the touchstart event is associated with it, it can be used to trigger a javascript function.
Note: The touchstart event works only on touch screen devices.
Supported Tags
Syntax :
object.ontouchstart = myScript;
Below program illustrates the touchstart event :
Program: Executing a JavaScript when a user touches a P element.
Output:
After touching the screen
Supported Web Browsers: