-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
47 lines (47 loc) · 1.26 KB
/
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Ebbinghaus</title>
<link rel="stylesheet" href="style.min.css">
</head>
<body>
<div class="container" id="container">
</div>
<script>
var body = document.body;
function g(id) {
return document.getElementById(id);
}
function makeTimeLine() {
var div = document.createElement("div");
div.className = 'unit time-line';
for (var x = 1; x <= 75; x++) {
var unit = document.createElement("span");
unit.className = 'card';
unit.innerHTML = '第 '+x+' 天';
div.appendChild(unit);
}
g('container').appendChild(div);
}
makeTimeLine();
function makeUnitlog() {
var div = document.createElement("div");
div.className = 'unit learn';
for (var x = 1; x <= 15; x++) {
var unit = document.createElement("span");
unit.className = 'card';
unit.innerHTML = x + 'd';
div.appendChild(unit);
}
g('container').appendChild(div);
}
function initUnitLog(n) {
for (var i = n; i >= 0; i--) {
makeUnitlog();
}
}
initUnitLog(60);
</script>
</body>
</html>