Wednesday, July 3, 2024
HomeLanguagesJavascriptWeb Window API | Window locationbar property

Web Window API | Window locationbar property

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

Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!

Ted Musemwa
As a software developer I’m interested in the intersection of computational thinking and design thinking when solving human problems. As a professional I am guided by the principles of experiential learning; experience, reflect, conceptualise and experiment.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments