回答編集履歴
3
chousei
test
CHANGED
@@ -25,7 +25,7 @@
|
|
25
25
|
}
|
26
26
|
words.forEach((word) => {
|
27
27
|
let tr = document.createElement('tr');
|
28
|
-
tr.innerHTML
|
28
|
+
tr.innerHTML = word.showInfo();
|
29
29
|
tbody.appendChild(tr);
|
30
30
|
});
|
31
31
|
total.textContent = `全${words.length}件`;
|
2
chousei
test
CHANGED
@@ -22,7 +22,6 @@
|
|
22
22
|
tbody.innerHTML = '';;
|
23
23
|
if(words.length==0){
|
24
24
|
tbody.innerHTML = '<tr><td colspan=2 id="class">BASIC 300</td></tr>';;
|
25
|
-
console.log(111);
|
26
25
|
}
|
27
26
|
words.forEach((word) => {
|
28
27
|
let tr = document.createElement('tr');
|
1
調整
test
CHANGED
@@ -18,12 +18,16 @@
|
|
18
18
|
<script>
|
19
19
|
'use strict';
|
20
20
|
function updateTable(words=[]) {
|
21
|
-
table.
|
21
|
+
const tbody=table.querySelector('tbody');
|
22
|
+
tbody.innerHTML = '';;
|
23
|
+
if(words.length==0){
|
22
|
-
|
24
|
+
tbody.innerHTML = '<tr><td colspan=2 id="class">BASIC 300</td></tr>';;
|
25
|
+
console.log(111);
|
26
|
+
}
|
23
27
|
words.forEach((word) => {
|
24
28
|
let tr = document.createElement('tr');
|
25
|
-
tr.innerHTML = word.showInfo();
|
29
|
+
tr.innerHTML += word.showInfo();
|
26
|
-
t
|
30
|
+
tbody.appendChild(tr);
|
27
31
|
});
|
28
32
|
total.textContent = `全${words.length}件`;
|
29
33
|
}
|
@@ -68,19 +72,21 @@
|
|
68
72
|
});
|
69
73
|
</script>
|
70
74
|
|
71
|
-
|
75
|
+
<h1>プログラミング必須英単語600+</h1>
|
72
|
-
|
76
|
+
<input type="text" placeholder="単語">
|
73
|
-
|
77
|
+
<input type="text" placeholder="意味">
|
74
|
-
|
78
|
+
<button id="btn">登録</button>
|
75
|
-
|
79
|
+
<p id="total">全0件</p>
|
76
|
-
|
80
|
+
<table id="table">
|
81
|
+
<thead>
|
77
|
-
|
82
|
+
<tr>
|
78
|
-
|
83
|
+
<th>単語</th>
|
79
|
-
|
84
|
+
<th>意味</th>
|
80
|
-
|
85
|
+
</tr>
|
81
|
-
<tr>
|
82
|
-
<td colspan=2 id="class">BASIC 300</td>
|
83
|
-
|
86
|
+
</thead>
|
87
|
+
<tbody>
|
88
|
+
</tbody>
|
84
|
-
|
89
|
+
</table>
|
85
90
|
<button id="remove">remove</button>
|
86
91
|
```
|
92
|
+
※一部調整
|