/

HTML / CSS / JavaScript Tutorial

JavaScript Window property: defaultStatus

[this page | pdf | back links]

The defaultStatus property (of the JavaScript BOM window object) sets or returns the default text in the window statusbar.

 

Setting the defaultStatus property typically does not work with many major browsers (as it introduces scope for impersonation of sites). To allow scripts to change the status text, the user must typically alter the configuration settings of the browser.

 

EXAMPLE:


HTML USED IN THIS EXAMPLE:
<!DOCTYPE html>
<html> <!-- Copyright (c) Nematrian Limited 2018 -->
<head></head>
<body>
Window default default status: <b id="element"></b><br>

<script>
window.defaultStatus = "Hello";
var x = window.defaultStatus;
document.getElementById("element").innerHTML = x;
</script>

</body>
</html>


NAVIGATION LINKS
Contents | Prev | Next | JavaScript DOM (and BOM)


Desktop view | Switch to Mobile