回答編集履歴
1
chousei
test
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
```javascript
|
2
2
|
|
3
|
+
<button class="A B C">btn</button>
|
4
|
+
|
5
|
+
<script>
|
6
|
+
|
7
|
+
document.querySelector('.A').addEventListener('click',e=>{
|
8
|
+
|
3
|
-
['B','C','X','Y'].forEach(x=>
|
9
|
+
['B','C','X','Y'].forEach(x=>e.target.classList.toggle(x));
|
10
|
+
|
11
|
+
});
|
12
|
+
|
13
|
+
</script>
|
4
14
|
|
5
15
|
|
6
16
|
|