Skip to content
Related Articles

Related Articles

HTML DOM Input Tel blur() Method

Improve Article
Save Article
  • Last Updated : 29 Aug, 2022
Improve Article
Save Article

The input Tel blur() method in HTML DOM is used to pull or remove focus from the tel field when the event occurs.  

Syntax:

telObject.blur()

Parameters: This method does not contain any parameter values.

Return Value: It does not return any value.

Example: Below program illustrates the use of the input tel blur() method in HTML DOM. 

HTML




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


Output:     

 

Supported Browsers:

  • Google Chrome 3 and above
  • Firefox
  • Edge 12 and above
  • Opera 11 and above
  • Apple Safari 4 and above
My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!