回答編集履歴
1
chousei
test
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
```javascript
|
2
2
|
|
3
|
-
const cls = ["btn01","btn02","btn03"]
|
3
|
+
const cls = ["btn01","btn02","btn03"];
|
4
4
|
|
5
5
|
document.querySelectorAll('.btn').forEach((x,y)=>{
|
6
6
|
|
7
7
|
x.addEventListener('click',()=>{
|
8
8
|
|
9
|
-
x.
|
9
|
+
x.textContent="変わったよ";
|
10
10
|
|
11
11
|
x.classList.add(cls[y]);
|
12
12
|
|