回答編集履歴
1
追記
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
<p>整数値を入力してください</p>
|
18
18
|
|
19
|
-
<div id=result></div>
|
19
|
+
<div id=result></div> <!-- 追加 -->
|
20
20
|
|
21
21
|
|
22
22
|
|
@@ -58,9 +58,9 @@
|
|
58
58
|
|
59
59
|
}
|
60
60
|
|
61
|
-
var result = document.getElementById('result');
|
61
|
+
var result = document.getElementById('result'); //追加
|
62
62
|
|
63
|
-
result.innerHTML = "";
|
63
|
+
result.innerHTML = ""; //追加
|
64
64
|
|
65
65
|
for (let number = 1; number <= 100; number++) {
|
66
66
|
|
@@ -78,9 +78,7 @@
|
|
78
78
|
|
79
79
|
p.textContent = ("FizzBuzz" + " "+ number);
|
80
80
|
|
81
|
-
p.className = 'FiBu';
|
82
|
-
|
83
|
-
result.appendChild(p);
|
81
|
+
result.appendChild(p); //修正
|
84
82
|
|
85
83
|
|
86
84
|
|
@@ -90,9 +88,7 @@
|
|
90
88
|
|
91
89
|
p.textContent = ("Fizz" + " " + number);
|
92
90
|
|
93
|
-
p.className = 'FiBu';
|
94
|
-
|
95
|
-
result.appendChild(p);
|
91
|
+
result.appendChild(p); //修正
|
96
92
|
|
97
93
|
|
98
94
|
|
@@ -102,9 +98,7 @@
|
|
102
98
|
|
103
99
|
p.textContent = ("Buzz" + " " + number);
|
104
100
|
|
105
|
-
p.className = 'FiBu';
|
106
|
-
|
107
|
-
result.appendChild(p);
|
101
|
+
result.appendChild(p); //修正
|
108
102
|
|
109
103
|
}
|
110
104
|
|