Javascript examples for Browser Object Model:Screen
The availHeight property returns the height of the user's screen, in pixels, minus interface features like the Windows Taskbar.
A Number, representing the height of the user's screen, in pixels
The following code shows how to get the available height of your screen:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from w ww. j a va 2s. c o m*/ var x = "Available Height: " + screen.availHeight + "px"; document.getElementById("demo").innerHTML = x; } </script> </body> </html>