/

HTML / CSS / JavaScript Tutorial

JavaScript Screen property: availHeight

[this page | pdf | back links]

The availHeight property (of the JavaScript BOM screen object) returns the screen height (excluding the taskbar).

 

EXAMPLE:


HTML USED IN THIS EXAMPLE:
<!DOCTYPE html>
<html> <!-- Copyright (c) Nematrian Limited 2018 -->
<head></head>
<body>
Screen information:<br><br>

availHeight: <b id="x1"></b><br>
availWidth: <b id="x2"></b><br>
colorDepth: <b id="x3"></b><br>
height: <b id="x4"></b><br>
pixelDepth: <b id="x5"></b><br>
width: <b id="x6"></b><br>

<script>
document.getElementById("x1").innerHTML = screen.availHeight;
document.getElementById("x2").innerHTML = screen.availWidth;
document.getElementById("x3").innerHTML = screen.colorDepth;
document.getElementById("x4").innerHTML = screen.height;
document.getElementById("x5").innerHTML = screen.pixelDepth;
document.getElementById("x6").innerHTML = screen.width;
</script>

</body>
</html>


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


Desktop view | Switch to Mobile