Related Articles

Related Articles

HTML | DOM Window status Property
  • Last Updated : 22 Feb, 2019

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.

full-stack-img




My Personal Notes arrow_drop_up
Recommended Articles
Page :