Javascript screen availHeight property returns the available height of display screen of the computer monitor based on resolution of the screen. availHeight property of screen object gives approximate value of height available to display the content in a browser along y-axis. Value returned by javascript screen object availHeight property does not match the actual available space inside the body section of web browsers due to number of toolbars and some other properties such as status bar and scrollbars. availHeight property returns the height in pixels excluding the height of window’s taskbar coz in Windows operation system, according to default settings, position of taskbar is bottom of display screen that reduces the available height for the web browsers.
Syntax for Javascript Screen availHeight property
screen.availHeight
or
window.screen.availHeight
You can use any of the above syntax to access the javascript screen availHeight property.
Examples of Javascript Screen availHeight property
<script type="text/javascript" language="javascript">
document.write(screen.availHeight);
document.write("<br />");
document.write(window.screen.availHeight);
</script>
Continue to next tutorial: Javascript screen colorDepth property to learn how to get the screen graphics color quality.