HTML | DOM TouchEvent touches Property

The TouchEvent touches property in HTML DOM is used to return the array of touch object. It returns one for each finger that is currently touching to the surface. The touches property is a read only property and it returns an array of touch objects.



Return Value: It return the array of touch object.

Below program illustrates the TouchEvent touches property in HTML:

Example: This example find the number of fingers touch on the surface.





<!DOCTYPE html>
        HTML DOM TouchEvent Touches Property
<body ontouchstart = "touch(event)" ontouchend = "touch(event)">
    <h2>TouchEvent Touches Property</h2>
    <p>Number of fingers touching this document:
    <span id="test"></span>.
    <!-- script to colunt number of touch -->
        function touch(event) {
            var t = event.touches.length;
            document.getElementById("test").innerHTML = t;


Before touching the document:

After touching the document:

Supported Browsers: The browser supported by DOM TouchEvent touches Property are listed below:

  • Internet Explorer 10.0
  • Google Chrome 22.0
  • Firefox 52.0


My Personal Notes arrow_drop_up

I am a technology enthusiast who has a keen interest in programming I am pursuing Engineering in Computer Science from GEU, Dehradun I like to unwind by watching movies and English sitcomsI have a keen interest in music

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :
Practice Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.