JS – BOM – Browser Object Model – Get Screen Size

The Code:

<!DOCTYPE html>
<html>
<body>

<script>
document.write("Available Width: " + screen.availWidth);
document.write("<br>");
document.write("Available Height: " + screen.availHeight);
</script>

</body>
</html>

Sample result:

Available Width: 1920
Available Height: 1040

My official WebSite >