回答編集履歴

1

chousei

2020/09/09 02:36

投稿

yambejp
yambejp

スコア116724

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.innerHTML="変わったよ";
9
+ x.textContent="変わったよ";
10
10
 
11
11
  x.classList.add(cls[y]);
12
12