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:
xxxxxxxxxx
1
console.log(screen.height);
In this example, we present a full example of how to get a desktop screen height.
xxxxxxxxxx
1
2
<html>
3
<body>
4
<script>
5
6
var height = screen.height;
7
8
console.log('height: ' + height);
9
10
</script>
11
</body>
12
</html>