質問編集履歴

1

タグ変更しました→javascript

2018/09/02 03:50

投稿

_L9u7c4i0a
_L9u7c4i0a

スコア25

test CHANGED
File without changes
test CHANGED
@@ -28,31 +28,29 @@
28
28
 
29
29
  <style type="text/css">
30
30
 
31
- img {
31
+ img {
32
32
 
33
- width: 100px;
33
+ width: 100px;
34
34
 
35
- height: 100px;
35
+ height: 100px;
36
36
 
37
- margin: 10px;
37
+ margin: 10px;
38
38
 
39
- }
39
+ }
40
40
 
41
41
  </style>
42
42
 
43
- <script type="text/javascript">
43
+ <script type="text/javascript">
44
44
 
45
45
  function usa(){
46
46
 
47
- document.animal_change.src = "usa.png";
47
+ document.animal_img.src = "usa.png";
48
48
 
49
- }
49
+ }
50
-
51
-
52
50
 
53
51
  function kuma(){
54
52
 
55
- document.animal_igm.src = "kuma.png";
53
+ document.animal_img.src = "kuma.png";
56
54
 
57
55
  }
58
56
 
@@ -60,19 +58,19 @@
60
58
 
61
59
  </head>
62
60
 
63
- <body>
61
+ <body>
64
-
65
- <input type="radio" name="animal" value="usa" onclick="usa()">ウサギ
66
-
67
- <input type="radio" name="animal" value="kuma" onclick="kuma()">クマ</p>
68
62
 
69
63
 
70
64
 
71
- <img src="usa.png" name="animal_igm">
65
+ <input type="radio" name="animal" value="1" onclick="usa()">ウサギ
66
+
67
+ <input type="radio" name="animal" value="2" onclick="kuma()">クマ</p>
72
68
 
73
69
 
74
70
 
75
- </div>
71
+ <img src="usa.png" name="animal_img">
72
+
73
+
76
74
 
77
75
  </body>
78
76