Horje
HTML DOM Input URL blur() Method

The Input URL blur() method in HTML DOM is used to extract or remove focus from the URL text field when the event occurs.  

Syntax:

urlObject.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 URL blur()  method in HTML DOM.  

HTML

<!DOCTYPE html>
<html>
  
<head>
    <title>
        HTML DOM Input URL blur() Method
    </title>
</head>
  
<body style="text-align:center;">
  
    <h1 style="color:green">GeeksforGeeks</h1>
  
    <strong>DOM Input URL blur() method</strong>
    <form id="myForm">
       <input type="URL" 
              id="url_id" name="Lnk">
    </form>
    <br>
    <button onclick="myblur()">Remove Focus!</button>
    <!-- script to clear focus to the URL field-->
    <script>
        function myblur() {
            var txt = document.getElementById("url_id").blur();
        }
    </script>
</body>
</html>

Output 

Supported Browsers: The list of browsers supported by the HTML DOM Input URL blur() method is given below.

  • Google Chrome
  • Mozilla Firefox
  • Internet Explorer
  • Opera
  • Safari



Reffered: https://www.geeksforgeeks.org


HTML

Related
HTML DOM Screen Object HTML DOM Screen Object
HTML DOM Input Text blur() Method HTML DOM Input Text blur() Method
HTML DOM Input URL focus() Method HTML DOM Input URL focus() Method
HTML DOM Marquee scrollDelay Property HTML DOM Marquee scrollDelay Property
HTML DOM Input Search focus() Method HTML DOM Input Search focus() Method

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
12