HTML | DOM Window status Property (original) (raw)

Last Updated : 5 Aug, 2022

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

Note: This property has been DEPRECATED and is no longer recommended.

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

Example 1: This example use window status property.

html `

HTML DOM Window status Property

GeeksforGeeks

<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>

`

Output:

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

html `

HTML DOM Window status Property
<!-- 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>
A message is seen on the status bar at the bottom of the page when mouse is placed over the text

<button onclick="ChangeDefStatus();">
    Change default status
</button>

<br><br>

<a href="#">
    When mouse move over, the browser
    will display the URL
</a>

`

Output:

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