teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

kaizenn

2018/05/27 01:05

投稿

anopurihana
anopurihana

スコア34

title CHANGED
File without changes
body CHANGED
@@ -99,4 +99,113 @@
99
99
  他に足りない情報などございましたらお申しつけください。
100
100
 
101
101
  力を貸していただける方、お待ちしております。
102
- 宜しくお願い致します。
102
+ 宜しくお願い致します。
103
+
104
+
105
+ ### 追記(euledgeさんのご回答へのレスポンス)
106
+
107
+ ```html
108
+ //screen.jsp
109
+
110
+ <div id = "settings">
111
+
112
+ <div class="screen" id="1">
113
+
114
+
115
+ <div class="background">
116
+ <input type="image" name="background"
117
+ src="/App_novelGame/img/${background}.jpg" />
118
+ </div>
119
+
120
+
121
+ <div class="charimage">
122
+ <input type="image" name="charimg"
123
+ src="/App_novelGame/img/${chartype}.png" />
124
+ </div>
125
+
126
+ <div class="dialogue-frame">
127
+ <input type="image" src="/App_novelGame/img/frame.png" /> <span><c:out
128
+ value="${dialogue}" /></span>
129
+ </div>
130
+
131
+ </div>
132
+
133
+ <div class="screen" id="2">
134
+
135
+
136
+ <div class="background">
137
+ <input type="image" name="background"
138
+ src="/App_novelGame/img/${background}.jpg" />
139
+ </div>
140
+
141
+
142
+ <div class="charimage">
143
+ <input type="image" name="charimg"
144
+ src="/App_novelGame/img/${chartype}.png" />
145
+ </div>
146
+
147
+ <div class="dialogue-frame">
148
+ <input type="image" src="/App_novelGame/img/frame.png" /> <span><c:out
149
+ value="${dialogue}" /></span>
150
+ </div>
151
+
152
+ </div>
153
+
154
+ <div class="screen" id="3">
155
+
156
+
157
+ <div class="background">
158
+ <input type="image" name="background"
159
+ src="/App_novelGame/img/${background}.jpg" />
160
+ </div>
161
+
162
+
163
+ <div class="charimage">
164
+ <input type="image" name="charimg"
165
+ src="/App_novelGame/img/${chartype}.png" />
166
+ </div>
167
+
168
+ <div class="dialogue-frame">
169
+ <input type="image" src="/App_novelGame/img/frame.png" /> <span><c:out
170
+ value="${dialogue}" /></span>
171
+ </div>
172
+
173
+ </div>
174
+ <%-- 以下省略 --%>
175
+
176
+ </div>
177
+
178
+
179
+
180
+ コード
181
+ ```
182
+
183
+ ```javascript
184
+
185
+ let current_screen_no = 1;
186
+ let screens = document.getElementsByClassName("screen");
187
+ let screen_num = screens.length;
188
+ display_screen(1);
189
+
190
+ // スクリーン切り替えの処理
191
+ function display_screen(screen_no) {
192
+ Array.prototype.forEach.call(screens, function(screen) {
193
+ if (Number(screen.id) === screen_no) {
194
+ screen.style.display = "block";
195
+ } else {
196
+ screen.style.display = "none";
197
+ }
198
+ });
199
+ current_screen_no = current_screen_no + 1;
200
+ }
201
+
202
+ document.body.addEventListener('click', function(mEvent) {
203
+ if (current_screen_no <= screen_num) {
204
+ display_screen(current_screen_no);
205
+ }
206
+ }, true);
207
+
208
+
209
+
210
+ コード
211
+ ```

1

改善

2018/05/27 01:04

投稿

anopurihana
anopurihana

スコア34

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