Get screen width

Simple example of getting the width of the screen.
<!DOCTYPE html>
<html>
<body>

<div id="content"></div>

<script>
document.getElementById("content").innerHTML = 
"The width of the screen is " + screen.width;
</script>

</body>
</html>

Responses

0 Replies