質問編集履歴
2
コードを少し変えました
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,25 +4,23 @@
|
|
4
4
|
|
5
5
|
なにか間違えているところがあれば教えてください。
|
6
6
|
|
7
|
-
```
|
7
|
+
```
|
8
8
|
|
9
|
-
var x = 0;
|
10
|
-
|
11
|
-
var y ;
|
12
|
-
|
13
|
-
console.log(x);
|
14
|
-
|
15
|
-
elem.innerHTML =<div>問正解でした</div>
|
16
|
-
|
17
|
-
<
|
9
|
+
<html>
|
18
|
-
|
19
|
-
<input type="text" name="entry.0000000000" id="hokkaidou" value="" placeholder="1">
|
20
|
-
|
21
|
-
<input type="button" value="答え合わせをする" onclick="a(hokkaidou.value)">
|
22
10
|
|
23
11
|
<script type="text/javascript">
|
24
12
|
|
25
13
|
function hokkaidou(a)
|
14
|
+
|
15
|
+
var x = 0;
|
16
|
+
|
17
|
+
var y = "間違えたのは、";
|
18
|
+
|
19
|
+
var z = "問正解でした";
|
20
|
+
|
21
|
+
x += z
|
22
|
+
|
23
|
+
document.write(x)
|
26
24
|
|
27
25
|
if(hokkaidou == "北海道"){
|
28
26
|
|
@@ -38,6 +36,10 @@
|
|
38
36
|
|
39
37
|
</script>
|
40
38
|
|
39
|
+
<input type="text" name="entry.0000000000" id="hokkaidou" value="" placeholder="1">
|
40
|
+
|
41
|
+
<input type="button" value="答え合わせをする" onclick="a(hokkaidou.value)">
|
42
|
+
|
41
|
-
|
43
|
+
</html>
|
42
44
|
|
43
45
|
```
|
1
起きたことを書きました
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
答え合わせをする画面
|
test
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
答え合わせをする画面を作ったのですがうまく表示されません。
|
2
|
+
|
3
|
+
ボタンを押しても反応がありません
|
2
4
|
|
3
5
|
なにか間違えているところがあれば教えてください。
|
4
6
|
|
5
|
-
```<html>
|
6
|
-
|
7
|
-
<script type="text/javascript">
|
7
|
+
```<script type="text/javascript">
|
8
8
|
|
9
9
|
var x = 0;
|
10
10
|
|
@@ -18,65 +18,11 @@
|
|
18
18
|
|
19
19
|
<input type="text" name="entry.0000000000" id="hokkaidou" value="" placeholder="1">
|
20
20
|
|
21
|
-
<input type="t
|
22
|
-
|
23
|
-
<input type="text" name="entry.0000000000" id="iwate" value="" placeholder="3">
|
24
|
-
|
25
|
-
<input type="text" name="entry.0000000000" id="miyagi" value="" placeholder="4">
|
26
|
-
|
27
|
-
<input type="text" name="entry.0000000000" id="akita" value="" placeholder="5">
|
28
|
-
|
29
|
-
<input type="text" name="entry.0000000000" id="yamagata" value="" placeholder="6">
|
30
|
-
|
31
|
-
<input type="text" name="entry.0000000000" id="hukusima" value="" placeholder="7">
|
32
|
-
|
33
|
-
<input type="text" name="entry.0000000000" id="ibaraki" value="" placeholder="8">
|
34
|
-
|
35
|
-
<input type="text" name="entry.0000000000" id="totigi" value="" placeholder="9">
|
36
|
-
|
37
|
-
<input type="text" name="entry.0000000000" id="gunma" value="" placeholder="10">
|
38
|
-
|
39
|
-
<input type="text" name="entry.0000000000" id="saitama" value="" placeholder="11">
|
40
|
-
|
41
|
-
<input type="text" name="entry.0000000000" id="tiba" value="" placeholder="12">
|
42
|
-
|
43
|
-
<input type="text" name="entry.0000000000" id="toukyou" value="" placeholder="13">
|
44
|
-
|
45
|
-
<input type="text" name="entry.0000000000" id="kanagawa" value="" placeholder="14">
|
46
|
-
|
47
|
-
<input type="text" name="entry.0000000000" id="niigata" value="" placeholder="15">
|
48
|
-
|
49
|
-
<input type="text" name="entry.0000000000" id="toyama" value="" placeholder="16">
|
50
|
-
|
51
|
-
<input type="text" name="entry.0000000000" id="isikawa" value="" placeholder="17">
|
52
|
-
|
53
|
-
<input type="text" name="entry.0000000000" id="hukui" value="" placeholder="18">
|
54
|
-
|
55
|
-
<input type="text" name="entry.0000000000" id="yamanasi" value="" placeholder="19">
|
56
|
-
|
57
|
-
<input type="text" name="entry.0000000000" id="nagano" value="" placeholder="20">
|
58
|
-
|
59
|
-
・
|
60
|
-
|
61
|
-
・
|
62
|
-
|
63
|
-
・
|
64
|
-
|
65
|
-
<input type="button" value="答え合わせをする" onclick="a(hokkaidou.value);b(aomori.value);c(iwate.value);d(miyagi.value);e(akita.value);f(yamagata.value);g(hukusima.value);h(ibaraki.value);i(totigi.value);j(gunma.value);k(saitama.value);l(tiba.value);m(toukyou.value);n(kanagawa.value);o(niigata.value);p(toyama.value);q(isikawa.value);r(hukui.value);s(yamanasi.value);t(nagano.value);u(gihu.value);v(sizuoka.value);w(aiti.value);x(mie.value);y(siga.value);z(kyouto.value);aa(oosaka.value);ab(hyougo.value);ac(nara.value);ad(wakayama.value);ae(tottori.value);af(simane.value);ag(okayama.value);ah(hirosima.value);ai(yamaguti.value);aj(tokusima.value);ak(kagawa.value);al(ehime.value);am(kouti.value);an(hukuoka.value);ao(saga.value);ap(nagasaki.value);aq(kumamoto.value);ar(ooita.value);as(miyazaki.value);at(kagosima.value);au(okinawa.value)">
|
21
|
+
<input type="button" value="答え合わせをする" onclick="a(hokkaidou.value)">
|
66
22
|
|
67
23
|
<script type="text/javascript">
|
68
24
|
|
69
25
|
function hokkaidou(a)
|
70
|
-
|
71
|
-
function aomori(b)
|
72
|
-
|
73
|
-
function iwate(c)
|
74
|
-
|
75
|
-
function miyagi(d)
|
76
|
-
|
77
|
-
function akita(e)
|
78
|
-
|
79
|
-
function yamagata(f)・・・
|
80
26
|
|
81
27
|
if(hokkaidou == "北海道"){
|
82
28
|
|
@@ -90,94 +36,8 @@
|
|
90
36
|
|
91
37
|
}
|
92
38
|
|
93
|
-
if(aomori == "青森県"){
|
94
|
-
|
95
|
-
x +=1
|
96
|
-
|
97
|
-
} else {
|
98
|
-
|
99
|
-
y +="2."
|
100
|
-
|
101
|
-
}
|
102
|
-
|
103
|
-
}
|
104
|
-
|
105
|
-
if(iwate == "岩手県"){
|
106
|
-
|
107
|
-
x +=1
|
108
|
-
|
109
|
-
} else {
|
110
|
-
|
111
|
-
y +="3."
|
112
|
-
|
113
|
-
}
|
114
|
-
|
115
|
-
}
|
116
|
-
|
117
|
-
if(miyagi == "宮城県"){
|
118
|
-
|
119
|
-
x +=1
|
120
|
-
|
121
|
-
} else {
|
122
|
-
|
123
|
-
y +="4."
|
124
|
-
|
125
|
-
}
|
126
|
-
|
127
|
-
}
|
128
|
-
|
129
|
-
if(akita == "青森県"){
|
130
|
-
|
131
|
-
x +=1
|
132
|
-
|
133
|
-
} else {
|
134
|
-
|
135
|
-
y +="5."
|
136
|
-
|
137
|
-
}
|
138
|
-
|
139
|
-
}
|
140
|
-
|
141
|
-
if(yamagata == "山形県"){
|
142
|
-
|
143
|
-
x +=1
|
144
|
-
|
145
|
-
} else {
|
146
|
-
|
147
|
-
y +="6."
|
148
|
-
|
149
|
-
}
|
150
|
-
|
151
|
-
}
|
152
|
-
|
153
|
-
if(hukusima == "福島県"){
|
154
|
-
|
155
|
-
x +=1
|
156
|
-
|
157
|
-
} else {
|
158
|
-
|
159
|
-
y +="7."
|
160
|
-
|
161
|
-
}
|
162
|
-
|
163
|
-
}
|
164
|
-
|
165
|
-
if(ibaraki == "茨城県"){
|
166
|
-
|
167
|
-
x +=1
|
168
|
-
|
169
|
-
} else {
|
170
|
-
|
171
|
-
y +="8."
|
172
|
-
|
173
|
-
}
|
174
|
-
|
175
|
-
}・・・
|
176
|
-
|
177
|
-
|
178
|
-
|
179
39
|
</script>
|
180
40
|
|
181
|
-
|
41
|
+
コード
|
182
42
|
|
183
43
|
```
|