Open In App

HTML DOM Input Tel form Property

Last Updated : 29 Aug, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The DOM Input Tel form Property in HTML is used for returning the reference of the form containing the input tel field. It is a read-only property that returns a form object on success. 

Syntax: 

telObject.form 

Return Value: It returns a string value that specifies the reference of the form containing the Input tel field. The value of this attribute must be the id of the <form> element. 

Example: Below program illustrates the HTML DOM Input Tel form property. 

HTML




<!DOCTYPE html>
<html>
<body style="text-align:center;">
    <h1 style="color:green;">
        GeeksForGeeks
    </h1>
    <h2> DOM Input Tel form Property </h2>
    <form id="myGeeks">
        <input type="tel" id="mytel"
               value="6753682635" readonly>
    </form>
    <br><br>
    <button onclick="GFG()">
        Return!
    </button>
    <p id="demo" style="font-size:25px"></p>
 
    <script>
        function GFG() {
            var x = document.getElementById("mytel").form.id;
            document.getElementById("demo").innerHTML = x;
        }
    </script>
</body>
</html>


Output:

HTML DOM Input Tel form Property

Supported Browsers:

  • Google Chrome 3+
  • Edge 12+
  • Firefox
  • Opera 11+
  • Safari 4+

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads