![]() |
VOOZH | about |
The touchcancel event is used to execute a script when the touch event gets interrupted.
It is considered a good practice to include the touchcancel event to clean up the code if the devices interrupt a touch event at different actions.
Supported Tags
Supported Tags
Syntax:
object.ontouchcancel = myScript;
Below program illustrates the touchcancel event :
Example-1: Executing a JavaScript when a touch is interrupted.
Output:
Before touching the screen:
After touching the screen:
Supported Browsers: