HTML DOM Input Tel blur() Method

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;">
        w3wiki
    </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