-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
51 lines (38 loc) · 973 Bytes
/
index.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 lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
#bg-div {
height: 500px;
width: 1000px;
background: url("image/car_3.jpg");
margin: 0 auto;
background-size: contain; /*What the meaning?*/
/*center this div*/
}
</style>
<script>
for (var i = 1; i < 5; ++i) {
setTimeout(function timer() {
console.log(i);
console.log(new Date());
}, i * 1000);
}
var obj = {
name: "n",
value: "val",
addr: "city"
}
//how to traversal the "obj"
//how to to object to json string
console.log(toString(obj));
//how to json string to object
var strObj = '{name: "n",value: "val",addr: "city"}';
</script>
</head>
<body>
<div id="bg-div">bg-div</div>
</body>
</html>