Skip to content

Commit 10e91a3

Browse files
DOM
1 parent c3ce424 commit 10e91a3

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed
Loading
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<title>window-BOM</title>
9+
<link rel="shortcut icon" href="images/js-logo.png" type="image/x-icon">
10+
</head>
11+
12+
<body>
13+
<h1 style="font-family: cursive;">The width and height of your screen is:</h1>
14+
<h2 id="textOne" style="font-family: monospace;"></h2>
15+
<script src="script.js"></script>
16+
</body>
17+
18+
</html>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
let height = window.innerHeight;
2+
let width = window.innerWidth;
3+
let textOne = document.getElementById('textOne');
4+
textOne.innerHTML = `
5+
<h2>Height: ${height} px</h2>
6+
<h2>Width: ${width} px</h2>
7+
`

0 commit comments

Comments
 (0)