Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

HTML DOM Input Tel select() Method

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

The input tel select() method in HTML DOM is used to select the contents of the input tel field. It is an in-built method of the input tel object.

Syntax:

telObject.select()

Parameters: This method does not accept any parameters.

Return Value: This method does not return any value.

Example: Below HTML code illustrate the use of input tel select() method in HTML DOM .  

HTML




<!DOCTYPE html>
<html>
<body style="text-align:center;">
    <h1 style="color:green;">
        GeeksforGeeks
    </h1>
    <h2> DOM Input Tel select() Method </h2>
    <legend>
        Phone Number:
        <input type="tel" id="mytel"
            value="6753682635" autofocus>
    </legend>
    <br><br>
    <button onclick="select()">
        Select
    </button>
    <script>
        function select() {
            var x = document.getElementById("mytel").select();
        }
    </script>
</body>
</html>


Output:             

 

Supported Browsers:

  • Google Chrome 3+
  • Edge 12+
  • Firefox
  • Safari 4+
  • Opera 11+
My Personal Notes arrow_drop_up
Last Updated : 29 Aug, 2022
Like Article
Save Article
Similar Reads
Related Tutorials