回答編集履歴

1

追記

2020/04/19 11:13

投稿

soliste16
soliste16

スコア757

test CHANGED
@@ -11,3 +11,23 @@
11
11
  const tr_count = document.getElementById('tr-'+$(this).attr('id').slice(-1));
12
12
 
13
13
  ```
14
+
15
+
16
+
17
+ **追記**
18
+
19
+ ```javascript
20
+
21
+ /* Vanilla JS */
22
+
23
+ btn_2.addEventListener('click',function(e){
24
+
25
+ const list_item = document.getElementById('list_item');
26
+
27
+ const tr_count = document.getElementById('tr-'+e.target.id.slice(-1));
28
+
29
+ list_item.removeChild(tr_count);
30
+
31
+ });
32
+
33
+ ```