回答編集履歴

2

不要なコードを除去

2022/03/31 05:46

投稿

Lhankor_Mhy
Lhankor_Mhy

スコア36134

test CHANGED
@@ -18,8 +18,6 @@
18
18
  > ```js
19
19
  > <input type="button" value="表示"
20
20
  > onclick="document.getElementById('xyz').style.display = 'block';">
21
- > <input type="button" value="非表示"
22
- > onclick="document.getElementById('xyz').style.display = 'none';">
23
21
  > ```
24
22
  > [HTMLの表示/非表示を切り替える2つの方法 \[ホームページ作成\] All About](https://allabout.co.jp/gm/gc/23973/#aa23973display-source)
25
23
 

1

コードで、とのことなので追記

2022/03/31 05:45

投稿

Lhankor_Mhy
Lhankor_Mhy

スコア36134

test CHANGED
@@ -8,3 +8,18 @@
8
8
 
9
9
  対象となる要素の参照については以下をご参照ください。
10
10
  [検索: getElement* と querySelector*](https://ja.javascript.info/searching-elements-dom)
11
+
12
+ ---
13
+
14
+ ### コードで、とのことなので追記
15
+
16
+ こちらが参考になると思います。
17
+
18
+ > ```js
19
+ > <input type="button" value="表示"
20
+ > onclick="document.getElementById('xyz').style.display = 'block';">
21
+ > <input type="button" value="非表示"
22
+ > onclick="document.getElementById('xyz').style.display = 'none';">
23
+ > ```
24
+ > [HTMLの表示/非表示を切り替える2つの方法 \[ホームページ作成\] All About](https://allabout.co.jp/gm/gc/23973/#aa23973display-source)
25
+