status property (window)
Sets the message in the status bar or retrieves the previously specified value.
The status bar is used by the browser to display additional information.
For example, if the mouse is over an anchor element, the browser displays the destination URL of the anchor element in the status bar.
When no additional information needs to be displayed, the status bar contains the default message.
With the defaultStatus property the value of the default message can be modified.
To modify the currently displayed message in the status bar, use the window.status property.
Note that in Firefox, changing the text in the status bar is not allowed by default, the dom.disable_window_status_change setting (you can find it on the about:config page) must be set to false by the user to allow scripts to change it.Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
Possible values:
String that specifies the message or retrieves the previously specified message.
Default: false.
Example HTML code 1:
This example illustrates the use of the status property:
|
||||
<head> <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 bar message."; } </script> </head> <body> <div onmousemove="UpdateStatusBar (true);" onmouseout="UpdateStatusBar (false);"> A message is visible in the status bar while moving the mouse over this text. </div> <br /><br /> You can change the default message in the status bar with this button: <button onclick="ChangeDefStatus ();">Change default status</button> <br /><br /> <a href="#">If the mouse is over this anchor, the browser displays the destination URL in the status bar.</a> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
Related pages:
External links:
User Contributed Comments