Skip to content
Related Articles

Related Articles

HTML DOM Input tel name Property

View Discussion
Improve Article
Save Article
  • Last Updated : 26 Apr, 2022

The DOM input tel name property in HTML DOM is used to set or return the value of the name attribute of an input tel field. The name attribute is required for each input field. If the name attribute is not specified in an input field then the data of that field would not be sent at all.


  • It returns the Input tel name property.
  • It is used to set the Input tel name property. = name

Property Values: It contains a single value name that defines the name of the tel field.

Return Value: It returns a string value that represents the name of the tel field.

Example: This example illustrates how to return the input tel name property.


<!DOCTYPE html>
<body style="text-align:center;">
    <h1 style="color:green;">
    <h2> DOM Input Tel name property </h2>
        Phone Number:
        <input type="tel" id="mytel" name="Phone Number" 
            value="6753682635" required>
    <button onclick="myclick()">
        Click Here!
    <p id="demo" style="font-size:25px"></p>
        function myclick() {
            var x = document.getElementById("mytel").name;
            document.getElementById("demo").innerHTML = x;



Supported Browsers:

  • Google Chrome
  • Internet Explorer 10.0 +
  • Firefox
  • Opera
  • Safari

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!