質問編集履歴

2

kaizenn

2018/05/27 01:05

投稿

anopurihana
anopurihana

スコア34

test CHANGED
File without changes
test CHANGED
@@ -201,3 +201,221 @@
201
201
  力を貸していただける方、お待ちしております。
202
202
 
203
203
  宜しくお願い致します。
204
+
205
+
206
+
207
+
208
+
209
+ ### 追記(euledgeさんのご回答へのレスポンス)
210
+
211
+
212
+
213
+ ```html
214
+
215
+ //screen.jsp
216
+
217
+
218
+
219
+ <div id = "settings">
220
+
221
+
222
+
223
+ <div class="screen" id="1">
224
+
225
+
226
+
227
+
228
+
229
+ <div class="background">
230
+
231
+ <input type="image" name="background"
232
+
233
+ src="/App_novelGame/img/${background}.jpg" />
234
+
235
+ </div>
236
+
237
+
238
+
239
+
240
+
241
+ <div class="charimage">
242
+
243
+ <input type="image" name="charimg"
244
+
245
+ src="/App_novelGame/img/${chartype}.png" />
246
+
247
+ </div>
248
+
249
+
250
+
251
+ <div class="dialogue-frame">
252
+
253
+ <input type="image" src="/App_novelGame/img/frame.png" /> <span><c:out
254
+
255
+ value="${dialogue}" /></span>
256
+
257
+ </div>
258
+
259
+
260
+
261
+ </div>
262
+
263
+
264
+
265
+ <div class="screen" id="2">
266
+
267
+
268
+
269
+
270
+
271
+ <div class="background">
272
+
273
+ <input type="image" name="background"
274
+
275
+ src="/App_novelGame/img/${background}.jpg" />
276
+
277
+ </div>
278
+
279
+
280
+
281
+
282
+
283
+ <div class="charimage">
284
+
285
+ <input type="image" name="charimg"
286
+
287
+ src="/App_novelGame/img/${chartype}.png" />
288
+
289
+ </div>
290
+
291
+
292
+
293
+ <div class="dialogue-frame">
294
+
295
+ <input type="image" src="/App_novelGame/img/frame.png" /> <span><c:out
296
+
297
+ value="${dialogue}" /></span>
298
+
299
+ </div>
300
+
301
+
302
+
303
+ </div>
304
+
305
+
306
+
307
+ <div class="screen" id="3">
308
+
309
+
310
+
311
+
312
+
313
+ <div class="background">
314
+
315
+ <input type="image" name="background"
316
+
317
+ src="/App_novelGame/img/${background}.jpg" />
318
+
319
+ </div>
320
+
321
+
322
+
323
+
324
+
325
+ <div class="charimage">
326
+
327
+ <input type="image" name="charimg"
328
+
329
+ src="/App_novelGame/img/${chartype}.png" />
330
+
331
+ </div>
332
+
333
+
334
+
335
+ <div class="dialogue-frame">
336
+
337
+ <input type="image" src="/App_novelGame/img/frame.png" /> <span><c:out
338
+
339
+ value="${dialogue}" /></span>
340
+
341
+ </div>
342
+
343
+
344
+
345
+ </div>
346
+
347
+ <%-- 以下省略 --%>
348
+
349
+
350
+
351
+ </div>
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+ コード
360
+
361
+ ```
362
+
363
+
364
+
365
+ ```javascript
366
+
367
+
368
+
369
+ let current_screen_no = 1;
370
+
371
+ let screens = document.getElementsByClassName("screen");
372
+
373
+ let screen_num = screens.length;
374
+
375
+ display_screen(1);
376
+
377
+
378
+
379
+ // スクリーン切り替えの処理
380
+
381
+ function display_screen(screen_no) {
382
+
383
+ Array.prototype.forEach.call(screens, function(screen) {
384
+
385
+ if (Number(screen.id) === screen_no) {
386
+
387
+ screen.style.display = "block";
388
+
389
+ } else {
390
+
391
+ screen.style.display = "none";
392
+
393
+ }
394
+
395
+ });
396
+
397
+ current_screen_no = current_screen_no + 1;
398
+
399
+ }
400
+
401
+
402
+
403
+ document.body.addEventListener('click', function(mEvent) {
404
+
405
+ if (current_screen_no <= screen_num) {
406
+
407
+ display_screen(current_screen_no);
408
+
409
+ }
410
+
411
+ }, true);
412
+
413
+
414
+
415
+
416
+
417
+
418
+
419
+ コード
420
+
421
+ ```

1

改善

2018/05/27 01:04

投稿

anopurihana
anopurihana

スコア34

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,6 @@
1
1
  こんにちは。
2
2
 
3
- 現在、「Servlet⇔DBのデータ受け渡し」をテーマにした模擬プロジェクトでちょっとしたノベルゲームを作っています。問題は以下の通りです。
3
+ 現在、「Servlet⇔DBのデータ受け渡し」をテーマにした模擬プロジェクトでちょっとしたノベルゲームを作っています。開発環境はEclipseです。問題は以下の通りです。
4
4
 
5
5
 
6
6