Javascript examples for Browser Object Model:Screen
The height property returns the total height of the user's screen, in pixels.
A Number, representing the total height of the user's screen, in pixels
The following code shows how to get the total height of your screen:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from ww w. jav a2 s . c om*/ var x = "Total Height: " + screen.height + "px"; document.getElementById("demo").innerHTML = x; } </script> </body> </html>