forked from nhattruongniit/learn-javascripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathload-default-image-not.html
51 lines (45 loc) · 1.11 KB
/
load-default-image-not.html
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html
xmlns="http://www.w3.org/1999/xhtml"
lang="ja"
xml:lang="ja"
dir="ltr"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml"
>
<head>
<title>Responsive Grid Image</title>
<style type="text/css">
img:before {
content: " ";
display: block;
position: absolute;
left: 0;
height: 41px;
width: 95px;
background-color: white;
background-image: url("./images/1.jpg");
}
</style>
</head>
<body>
<img src="./images/2.jpg" />
<script>
function foo(){
if(true){
var fruit1 = 'apple'; //exist in function scope
const fruit2 = 'banana'; //exist in block scope
let fruit3 = 'strawberry'; //exist in block scope
if(true) {
console.log(fruit2);
}
}
console.log(fruit1);
// console.log(fruit2);
console.log(fruit3);
}
foo();
//result:
</script>
</body>
</html>