EN
JavaScript - get desktop screen height
3
points
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>