Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7c38ab3

Browse files
window objects
1 parent b4e7b87 commit 7c38ab3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎Basic Introduction/index.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77
<title>Document</title>
8-
</head>
9-
<body>
10-
118

12-
<script>
9+
<style>
1310

14-
// The variables are bydefault use the window objects
11+
body{
12+
background-color: red;
13+
}
1514

16-
// var is the represent the global object
17-
// let is not defined the variable global object
18-
// so let gives the undefined
15+
</style>
16+
</head>
17+
<body>
1918

20-
varx='Hello';
19+
<script>
2120

22-
console.log(window.x);
21+
console.log(innerHeight);
22+
console.log(innerWidth);
2323
</script>
2424
</body>
2525
</html>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /