HTML | DOM Window status Property

The Window status property in HTML DOM is used to set or return the text in the status bar at the bottom of the browser.

Syntax:

window.status

Return Value: It returns a string which represents the text displayed in the status bar.



Example 1: This example use window status property.

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <title>
        HTML DOM Window status Property
    </title>
</head>
  
<body>
    <h1>GeeksforGeeks</h1>
      
    <h2>
        HTML DOM Window status Property
    </h2>
    <p>
        Look the text in the statusbar displayed
        at the bottom of the browser
    </p>
      
    <!-- Script to use window status property -->
    <script>
        window.status = "GeeksforGeeks";
    </script>
</body>
  
</html>                                

chevron_right


Output:

Example 2: This example use window status property to set the text of status bar.

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <title>
        HTML DOM Window status Property
    </title>
      
    <!-- Script to use window status property -->
    <script type="text/javascript">
        function UpdateStatusBar (over) {
            if (over)
                window.status = "The mouse is over the text.";
            else
                window.status = window.defaultStatus;
        }
  
        function ChangeDefStatus () {
            window.defaultStatus = "Default Status.";
        }
    </script>
</head>
  
<body>
    <div onmousemove="UpdateStatusBar(true);" 
        onmouseout="UpdateStatusBar(false);">
        A message is seen on the status bar at the bottom
        of the page when mouse is placed over the text
    </div><br>
  
    <button onclick="ChangeDefStatus();">
        Change default status
    </button>
      
    <br><br>
      
    <a href="#">
        When mouse move over, the browser
        will display the URL
    </a>
</body>
  
</html>                    

chevron_right


Output:

Supported Browsers: The DOM Window status property does not support any browser.



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.