質問編集履歴

2

解決いたしましたので、コードをさげさせていただきました

2016/08/23 09:43

投稿

Alt
Alt

スコア7

test CHANGED
File without changes
test CHANGED
@@ -42,343 +42,11 @@
42
42
 
43
43
  ```HTML
44
44
 
45
- <!DOCTYPE html>
46
-
47
- <html lang="ja">
48
45
 
49
46
 
47
+ ご回答頂きありがとうございました
50
48
 
51
- <head>
52
-
53
- <meta http-equiv="Content-Type" content="text/html;charset=shift_jis" />
54
-
55
- <link href="css/style.css" rel="stylesheet" type="text/css">
56
-
57
- <meta name="viewport" content="width=device-width, initial-scale=1">
58
-
59
- <meta name="description" content="時間割登録">
60
-
61
- <!--<link rel="shortcut icon" href="xxx.ico" type="image/vnd.microsoft.icon" />-->
62
-
63
- <title>時間割登録</title>
64
-
65
- <script type="text/javascript">
66
-
67
-
68
-
69
- function setTest() {
70
-
71
-
72
-
73
- var mon0r = document.getElementsByName("mon-0r");
74
-
75
- var classroom1 = [1201, 1202, 1203, 1204, 1205, 1206, 1209, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1401, 1402, 1403, 1404, 1405]
76
-
77
-
78
-
79
- alert(mon0r);
80
-
81
- for (var k = 0; k < classroom1.length; k++) {
82
-
83
-
84
-
85
- var option_mon0r = document.createElement("option");
86
-
87
- option.setAttribute("value", classroom1[k]);
88
-
89
- option.innerHTML = classroom1[k];
90
-
91
-
92
-
93
- mon0r.appendChild(option);
94
-
95
-
96
-
97
- }
98
-
99
-
100
-
101
-
102
-
103
- }
104
-
105
-
106
-
107
- </script>
108
-
109
- </head>
110
-
111
-
112
-
113
- <body onload="setTest()">
114
-
115
-
116
-
117
- <!-- ▽見出し -->
118
-
119
- <h1 class="center">時間割設定</h1>
120
-
121
-
122
-
123
- <!-- ▽タブメニュー(曜日) -->
124
-
125
- <p id="week">
126
-
127
- <a href="#mon" id="week1">月</a>
128
-
129
- <a href="#tue" id="week2">火</a>
130
-
131
- <a href="#wed" id="week3">水</a>
132
-
133
- <a href="#thu" id="week4">木</a>
134
-
135
- <a href="#fri" id="week5">金</a>
136
-
137
- </p>
138
-
139
-
140
-
141
- <!-- ▽タブ/月 -->
142
-
143
- <div id="mon" onload="setOption()">
144
-
145
- <table border="1">
146
-
147
- <tr>
49
+ 無事解決いたしました
148
-
149
- <th height="77" width="80">0限</th>
150
-
151
- <td>
152
-
153
- <!-- ▽ラジオボタン -->
154
-
155
- <form name="mon-0" class="sel-gou" onchange="setGou('s0')">
156
-
157
- <input type="radio" name="s0" id="m0-1" value=1 checked="">
158
-
159
- <label for="m0-1">1号館</label>
160
-
161
- <input type="radio" name="s0" id="m0-2" value=2>
162
-
163
- <label for="m0-2">2号館</label>
164
-
165
- <input type="radio" name="s0" id="m0-3" value=3>
166
-
167
- <label for="m0-3">3号館</label>
168
-
169
- </form>
170
-
171
- </td>
172
-
173
- <td colspan="3" width="100" align="center" onfocus="setOption(getGou())">
174
-
175
- <!-- ▽コンボボックス -->
176
-
177
- <form name="comboTest">
178
-
179
- <select name="mon-0r" id="mon-0r">
180
-
181
- <option value=0>--</option>
182
-
183
- </select>
184
-
185
- </form>
186
-
187
- </td>
188
-
189
- </tr>
190
-
191
- <tr>
192
-
193
- <th height="77">1限</th>
194
-
195
- <td>
196
-
197
- <!-- ▽ラジオボタン -->
198
-
199
- <form name="mon-1" class="sel-gou">
200
-
201
- <input type="radio" name="s1" id="m1-1" value=1 checked="">
202
-
203
- <label for="m1-1">1号館</label>
204
-
205
- <input type="radio" name="s1" id="m1-2" value=2>
206
-
207
- <label for="m1-2">2号館</label>
208
-
209
- <input type="radio" name="s1" id="m1-3" value=3>
210
-
211
- <label for="m1-3">3号館</label>
212
-
213
- </form>
214
-
215
- </td>
216
-
217
- </tr>
218
-
219
- <tr>
220
-
221
- <th height="77">2限</th>
222
-
223
- <td>
224
-
225
- <!-- ▽ラジオボタン -->
226
-
227
- <form name="mon-2" class="sel-gou">
228
-
229
- <input type="radio" name="s2" id="m2-1" value=1 checked="">
230
-
231
- <label for="m2-1">1号館</label>
232
-
233
- <input type="radio" name="s2" id="m2-2" value=2>
234
-
235
- <label for="m2-2">2号館</label>
236
-
237
- <input type="radio" name="s2" id="m2-3" value=3>
238
-
239
- <label for="m2-3">3号館</label>
240
-
241
- </form>
242
-
243
- </td>
244
-
245
- </tr>
246
-
247
- <tr>
248
-
249
- <th height="77">3限</th>
250
-
251
- <td>
252
-
253
- <!-- ▽ラジオボタン -->
254
-
255
- <form name="mon-3" class="sel-gou">
256
-
257
- <input type="radio" name="s3" id="m3-1" value=1 checked="">
258
-
259
- <label for="m3-1">1号館</label>
260
-
261
- <input type="radio" name="s3" id="m3-2" value=2>
262
-
263
- <label for="m3-2">2号館</label>
264
-
265
- <input type="radio" name="s3" id="m3-3" value=3>
266
-
267
- <label for="m3-3">3号館</label>
268
-
269
- </form>
270
-
271
- </td>
272
-
273
- </tr>
274
-
275
- <tr>
276
-
277
- <th height="77">4限</th>
278
-
279
- <td>
280
-
281
- <!-- ▽ラジオボタン -->
282
-
283
- <form name="mon-4" class="sel-gou">
284
-
285
- <input type="radio" name="s4" id="m4-1" value=1 checked="">
286
-
287
- <label for="m4-1">1号館</label>
288
-
289
- <input type="radio" name="s4" id="m4-2" value=2>
290
-
291
- <label for="m4-2">2号館</label>
292
-
293
- <input type="radio" name="s4" id="m4-3" value=3>
294
-
295
- <label for="m4-3">3号館</label>
296
-
297
- </form>
298
-
299
- </td>
300
-
301
- </tr>
302
-
303
- <tr>
304
-
305
- <th height="77">5限</th>
306
-
307
- <td>
308
-
309
- <!-- ▽ラジオボタン -->
310
-
311
- <form name="mon-5" class="sel-gou">
312
-
313
- <input type="radio" name="s5" id="m5-1" value=1 checked="">
314
-
315
- <label for="m5-1">1号館</label>
316
-
317
- <input type="radio" name="s5" id="m5-2" value=2>
318
-
319
- <label for="m5-2">2号館</label>
320
-
321
- <input type="radio" name="s5" id="m5-3" value=3>
322
-
323
- <label for="m5-3">3号館</label>
324
-
325
- </form>
326
-
327
- </td>
328
-
329
- </tr>
330
-
331
- </table>
332
-
333
-
334
-
335
- </div>
336
-
337
-
338
-
339
- <!-- ▽タブ/火 -->
340
-
341
- <div id="tue">
342
-
343
- </div>
344
-
345
-
346
-
347
- <!-- ▽タブ/水 -->
348
-
349
- <div id="wed">
350
-
351
- </div>
352
-
353
-
354
-
355
- <!-- ▽タブ/木 -->
356
-
357
- <div id="thu">
358
-
359
- </div>
360
-
361
-
362
-
363
- <!-- ▽タブ/金 -->
364
-
365
- <div id="fri">
366
-
367
- </div>
368
-
369
-
370
-
371
- <div id="button">
372
-
373
- <input type="button" value="登録">
374
-
375
- </div>
376
-
377
-
378
-
379
- </body>
380
-
381
- </html>
382
50
 
383
51
 
384
52
 

1

コード全体を掲載させていただきました。 見にくくて申し訳ないです。

2016/08/23 09:43

投稿

Alt
Alt

スコア7

test CHANGED
File without changes
test CHANGED
@@ -42,56 +42,348 @@
42
42
 
43
43
  ```HTML
44
44
 
45
- <td>
46
-
47
- <!-- ▽コンボボックス -->
48
-
49
- <form name="test">
50
-
51
- <select name="sel" id="selid">
52
-
53
- <option value=1>1</option>
54
-
55
- </select>
56
-
57
- </form>
58
-
59
- </td>
45
+ <!DOCTYPE html>
46
+
47
+ <html lang="ja">
48
+
49
+
50
+
51
+ <head>
52
+
53
+ <meta http-equiv="Content-Type" content="text/html;charset=shift_jis" />
54
+
55
+ <link href="css/style.css" rel="stylesheet" type="text/css">
56
+
57
+ <meta name="viewport" content="width=device-width, initial-scale=1">
58
+
59
+ <meta name="description" content="時間割登録">
60
+
61
+ <!--<link rel="shortcut icon" href="xxx.ico" type="image/vnd.microsoft.icon" />-->
62
+
63
+ <title>時間割登録</title>
64
+
65
+ <script type="text/javascript">
66
+
67
+
68
+
69
+ function setTest() {
70
+
71
+
72
+
73
+ var mon0r = document.getElementsByName("mon-0r");
74
+
75
+ var classroom1 = [1201, 1202, 1203, 1204, 1205, 1206, 1209, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1401, 1402, 1403, 1404, 1405]
76
+
77
+
78
+
79
+ alert(mon0r);
80
+
81
+ for (var k = 0; k < classroom1.length; k++) {
82
+
83
+
84
+
85
+ var option_mon0r = document.createElement("option");
86
+
87
+ option.setAttribute("value", classroom1[k]);
88
+
89
+ option.innerHTML = classroom1[k];
90
+
91
+
92
+
93
+ mon0r.appendChild(option);
94
+
95
+
96
+
97
+ }
98
+
99
+
100
+
101
+
102
+
103
+ }
104
+
105
+
106
+
107
+ </script>
108
+
109
+ </head>
110
+
111
+
112
+
113
+ <body onload="setTest()">
114
+
115
+
116
+
117
+ <!-- ▽見出し -->
118
+
119
+ <h1 class="center">時間割設定</h1>
120
+
121
+
122
+
123
+ <!-- ▽タブメニュー(曜日) -->
124
+
125
+ <p id="week">
126
+
127
+ <a href="#mon" id="week1">月</a>
128
+
129
+ <a href="#tue" id="week2">火</a>
130
+
131
+ <a href="#wed" id="week3">水</a>
132
+
133
+ <a href="#thu" id="week4">木</a>
134
+
135
+ <a href="#fri" id="week5">金</a>
136
+
137
+ </p>
138
+
139
+
140
+
141
+ <!-- ▽タブ/月 -->
142
+
143
+ <div id="mon" onload="setOption()">
144
+
145
+ <table border="1">
146
+
147
+ <tr>
148
+
149
+ <th height="77" width="80">0限</th>
150
+
151
+ <td>
152
+
153
+ <!-- ▽ラジオボタン -->
154
+
155
+ <form name="mon-0" class="sel-gou" onchange="setGou('s0')">
156
+
157
+ <input type="radio" name="s0" id="m0-1" value=1 checked="">
158
+
159
+ <label for="m0-1">1号館</label>
160
+
161
+ <input type="radio" name="s0" id="m0-2" value=2>
162
+
163
+ <label for="m0-2">2号館</label>
164
+
165
+ <input type="radio" name="s0" id="m0-3" value=3>
166
+
167
+ <label for="m0-3">3号館</label>
168
+
169
+ </form>
170
+
171
+ </td>
172
+
173
+ <td colspan="3" width="100" align="center" onfocus="setOption(getGou())">
174
+
175
+ <!-- ▽コンボボックス -->
176
+
177
+ <form name="comboTest">
178
+
179
+ <select name="mon-0r" id="mon-0r">
180
+
181
+ <option value=0>--</option>
182
+
183
+ </select>
184
+
185
+ </form>
186
+
187
+ </td>
188
+
189
+ </tr>
190
+
191
+ <tr>
192
+
193
+ <th height="77">1限</th>
194
+
195
+ <td>
196
+
197
+ <!-- ▽ラジオボタン -->
198
+
199
+ <form name="mon-1" class="sel-gou">
200
+
201
+ <input type="radio" name="s1" id="m1-1" value=1 checked="">
202
+
203
+ <label for="m1-1">1号館</label>
204
+
205
+ <input type="radio" name="s1" id="m1-2" value=2>
206
+
207
+ <label for="m1-2">2号館</label>
208
+
209
+ <input type="radio" name="s1" id="m1-3" value=3>
210
+
211
+ <label for="m1-3">3号館</label>
212
+
213
+ </form>
214
+
215
+ </td>
216
+
217
+ </tr>
218
+
219
+ <tr>
220
+
221
+ <th height="77">2限</th>
222
+
223
+ <td>
224
+
225
+ <!-- ▽ラジオボタン -->
226
+
227
+ <form name="mon-2" class="sel-gou">
228
+
229
+ <input type="radio" name="s2" id="m2-1" value=1 checked="">
230
+
231
+ <label for="m2-1">1号館</label>
232
+
233
+ <input type="radio" name="s2" id="m2-2" value=2>
234
+
235
+ <label for="m2-2">2号館</label>
236
+
237
+ <input type="radio" name="s2" id="m2-3" value=3>
238
+
239
+ <label for="m2-3">3号館</label>
240
+
241
+ </form>
242
+
243
+ </td>
244
+
245
+ </tr>
246
+
247
+ <tr>
248
+
249
+ <th height="77">3限</th>
250
+
251
+ <td>
252
+
253
+ <!-- ▽ラジオボタン -->
254
+
255
+ <form name="mon-3" class="sel-gou">
256
+
257
+ <input type="radio" name="s3" id="m3-1" value=1 checked="">
258
+
259
+ <label for="m3-1">1号館</label>
260
+
261
+ <input type="radio" name="s3" id="m3-2" value=2>
262
+
263
+ <label for="m3-2">2号館</label>
264
+
265
+ <input type="radio" name="s3" id="m3-3" value=3>
266
+
267
+ <label for="m3-3">3号館</label>
268
+
269
+ </form>
270
+
271
+ </td>
272
+
273
+ </tr>
274
+
275
+ <tr>
276
+
277
+ <th height="77">4限</th>
278
+
279
+ <td>
280
+
281
+ <!-- ▽ラジオボタン -->
282
+
283
+ <form name="mon-4" class="sel-gou">
284
+
285
+ <input type="radio" name="s4" id="m4-1" value=1 checked="">
286
+
287
+ <label for="m4-1">1号館</label>
288
+
289
+ <input type="radio" name="s4" id="m4-2" value=2>
290
+
291
+ <label for="m4-2">2号館</label>
292
+
293
+ <input type="radio" name="s4" id="m4-3" value=3>
294
+
295
+ <label for="m4-3">3号館</label>
296
+
297
+ </form>
298
+
299
+ </td>
300
+
301
+ </tr>
302
+
303
+ <tr>
304
+
305
+ <th height="77">5限</th>
306
+
307
+ <td>
308
+
309
+ <!-- ▽ラジオボタン -->
310
+
311
+ <form name="mon-5" class="sel-gou">
312
+
313
+ <input type="radio" name="s5" id="m5-1" value=1 checked="">
314
+
315
+ <label for="m5-1">1号館</label>
316
+
317
+ <input type="radio" name="s5" id="m5-2" value=2>
318
+
319
+ <label for="m5-2">2号館</label>
320
+
321
+ <input type="radio" name="s5" id="m5-3" value=3>
322
+
323
+ <label for="m5-3">3号館</label>
324
+
325
+ </form>
326
+
327
+ </td>
328
+
329
+ </tr>
330
+
331
+ </table>
332
+
333
+
334
+
335
+ </div>
336
+
337
+
338
+
339
+ <!-- ▽タブ/火 -->
340
+
341
+ <div id="tue">
342
+
343
+ </div>
344
+
345
+
346
+
347
+ <!-- ▽タブ/水 -->
348
+
349
+ <div id="wed">
350
+
351
+ </div>
352
+
353
+
354
+
355
+ <!-- ▽タブ/木 -->
356
+
357
+ <div id="thu">
358
+
359
+ </div>
360
+
361
+
362
+
363
+ <!-- ▽タブ/金 -->
364
+
365
+ <div id="fri">
366
+
367
+ </div>
368
+
369
+
370
+
371
+ <div id="button">
372
+
373
+ <input type="button" value="登録">
374
+
375
+ </div>
376
+
377
+
378
+
379
+ </body>
380
+
381
+ </html>
382
+
383
+
60
384
 
61
385
  ```
62
386
 
63
- ```JavaScript
64
-
65
- function setTest() {
66
-
67
-
68
-
69
- var sel = document.getElementsByName("sel");
70
-
71
- var num = [10, 20, 30, 40, 50];
72
-
73
-
74
-
75
- for (var k = 0; k < num.length; k++) {
76
-
77
-
78
-
79
- var option_add = document.createElement("option");
80
-
81
- option.setAttribute("value", num[k]);
82
-
83
- option.innerHTML = num[k];
84
-
85
-
86
-
87
- select.appendChild(option);
88
-
89
-
90
-
91
- }
92
-
93
- ```
94
-
95
387
 
96
388
 
97
389