Languages
[Edit]
EN

JavaScript - get desktop screen height

3 points
Created by:
Elias999
819

In this article, we would like to show you how to get desktop screen height using JavaScript.

Quick solution:

// ONLINE-RUNNER:browser;

console.log(screen.height);

 

Practical example

In this example, we present a full example of how to get a desktop screen height.

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<body>
  <script>

    var height = screen.height;

    console.log('height: ' + height);

  </script>
</body>
</html>

See also

  1. JavaScript - get desktop screen width

References

  1. Screen.height - Web APIs | MDN
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join