Check the visibility of menubar, toolbar, location bar, scrollbar and status bar in JavaScript

Description

The following code shows how to check the visibility of menubar, toolbar, location bar, scrollbar and status bar.

Example


<!--from w w w. j  a  v a  2s  .  c  om-->
<html>
<script language="JavaScript">
document.writeln('Menu Bar: ' + window.menubar.visible + '<br>');
document.writeln('Tool Bar: ' + window.toolbar.visible + '<br>');
document.writeln('Location Bar: ' + window.locationbar.visible + '<br>');
document.writeln('Personal Bar: ' + window.personalbar.visible + '<br>');
document.writeln('Scroll Bars: ' + window.scrollbars.visible + '<br>');
document.writeln('Status Bar: ' + window.statusbar.visible + '<br>');
document.close();
</script>
</html>

Click to view the demo

The code above generates the following result.

Check the visibility of menubar, toolbar, location bar, scrollbar and status bar in JavaScript