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

Related Articles

Web Window API | Window locationbar property

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

In Web API Window.locationbar property returns the object of locationbar, for which we can check the visibility.

Syntax:

objectReference = window.locationbar

Example: Check the visibility.




<!DOCTYPE html>
<html>
  
<head>
    <title>
        Window locationbar property
    </title>
    <style>
        a:focus {
            background-color: magenta;
        }
    </style>
  
    <script type="text/javascript">
        function getvisibility() {
            document.getElementById('visibility').innerHTML = 
              window.locationbar.visible;
  
        }
    </script>
  
</head>
  
<body>
    <center>
  
        <h1 style="color:green;">  
                GeeksForGeeks  
            </h1>
  
        <h2>HTML Window locationbar property</h2>
        <button onclick="getvisibility ();"
                id="btn">
          Check visibility
      </button>
        <p id='visibility'></p>
    </center>
</body>
  
</html>

Output:
Click the button:

When the button is clicked:

Supported Browsers:

  • Google Chrome
  • Edge 12
  • Firefox
  • Safari
  • Opera

My Personal Notes arrow_drop_up
Last Updated : 31 Jul, 2019
Like Article
Save Article
Similar Reads
Related Tutorials