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.
<!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>
Output:
Example 2: This example use window status property to set the text of status bar.
<!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>
Output:
Supported Browsers: The DOM Window status property does not support any browser.