Open In App

HTML DOM Input Tel blur() Method

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

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

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

Similar Reads