forked from anbang/javascript-notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-file.html
More file actions
37 lines (32 loc) · 772 Bytes
/
test-file.html
File metadata and controls
37 lines (32 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="test.css"/>
<style>
#test{
width: 200px;height: 200px;background-color: #002d32;
position: absolute;
top: 300px;
left: 20px;
}
</style>
</head>
<body>
<div id="test">2222222222</div>
<script>
var a;
// a 的值是 undefined
console.log("The value of a is " + a);
// Uncaught ReferenceError: b is not defined
// console.log("The value of b is " + b);
// c 的值是 undefined
console.log("The value of c is " + c);
var c;
// Uncaught ReferenceError: x is not defined
console.log("The value of x is " + x);
let x;
</script>
</body>
</html>