質問編集履歴

1

unk

2017/08/26 07:35

投稿

anopurihana
anopurihana

スコア34

test CHANGED
File without changes
test CHANGED
@@ -160,6 +160,102 @@
160
160
 
161
161
 
162
162
 
163
+ <center>
164
+
165
+ <div style="padding:0px 30px 30px 20px " "margin:10px 20px 10px 10px">
166
+
167
+ <textarea rows="3" cols="30" wrap="hard"
168
+
169
+ style="width:300px;height:100px;border-style:none;font-size:x-large;text-align:center;"
170
+
171
+ placeholder="Input your message!" id="ttttt" onchange="onChange();">
172
+
173
+ </textarea>
174
+
175
+ </div>
176
+
177
+ </center>
178
+
179
+
180
+
163
181
  ```
164
182
 
183
+ ```javascript
184
+
185
+ function sound1() {
186
+
187
+ document.getElementById("kokokara").play();
188
+
189
+ }
190
+
191
+ function sound2(){
192
+
193
+ document.getElementById('kokokara2').play();
194
+
195
+ }
196
+
197
+
198
+
199
+
200
+
201
+ function sound1(){
202
+
203
+
204
+
205
+ if( typeof( document.getElementById( "kokokara").currentTime) !='undefined'){
206
+
207
+ document.getElementById("kokokara").currentTime = 0;
208
+
209
+ }
210
+
211
+ document.getElementById("kokokara").play();
212
+
213
+ }
214
+
215
+
216
+
217
+ function sound2(){
218
+
219
+
220
+
221
+ if( typeof(document.getElementById('kokokara2').currentTime) !='undefined'){
222
+
223
+ document.getElementById('kokokara2').currentTime = 0;
224
+
225
+ }
226
+
227
+
228
+
229
+ document.getElementById('kokokara2').play();
230
+
231
+ }
232
+
233
+
234
+
235
+ function chgColor(arg) {
236
+
237
+ if (arg.value === "green") {
238
+
239
+ document.getElementById("ttttt").style.color = "green";
240
+
241
+ } else if (arg.value === "blue") {
242
+
243
+ document.getElementById("ttttt").style.color = "blue";
244
+
245
+ } else if (arg.value === "black") {
246
+
247
+ document.getElementById("ttttt").style.color = "black";
248
+
249
+ } else if (arg.value === "red") {
250
+
251
+ document.getElementById("ttttt").style.color = "#ff0000";
252
+
253
+
254
+
255
+ }
256
+
257
+ }
258
+
259
+ ```
260
+
165
261
  ※質問内容と関連のないコードは一部省略しております。