質問編集履歴
1
unk
title
CHANGED
File without changes
|
body
CHANGED
@@ -79,5 +79,53 @@
|
|
79
79
|
</center>
|
80
80
|
</form>
|
81
81
|
|
82
|
+
<center>
|
83
|
+
<div style="padding:0px 30px 30px 20px " "margin:10px 20px 10px 10px">
|
84
|
+
<textarea rows="3" cols="30" wrap="hard"
|
85
|
+
style="width:300px;height:100px;border-style:none;font-size:x-large;text-align:center;"
|
86
|
+
placeholder="Input your message!" id="ttttt" onchange="onChange();">
|
87
|
+
</textarea>
|
88
|
+
</div>
|
89
|
+
</center>
|
90
|
+
|
82
91
|
```
|
92
|
+
```javascript
|
93
|
+
function sound1() {
|
94
|
+
document.getElementById("kokokara").play();
|
95
|
+
}
|
96
|
+
function sound2(){
|
97
|
+
document.getElementById('kokokara2').play();
|
98
|
+
}
|
99
|
+
|
100
|
+
|
101
|
+
function sound1(){
|
102
|
+
|
103
|
+
if( typeof( document.getElementById( "kokokara").currentTime) !='undefined'){
|
104
|
+
document.getElementById("kokokara").currentTime = 0;
|
105
|
+
}
|
106
|
+
document.getElementById("kokokara").play();
|
107
|
+
}
|
108
|
+
|
109
|
+
function sound2(){
|
110
|
+
|
111
|
+
if( typeof(document.getElementById('kokokara2').currentTime) !='undefined'){
|
112
|
+
document.getElementById('kokokara2').currentTime = 0;
|
113
|
+
}
|
114
|
+
|
115
|
+
document.getElementById('kokokara2').play();
|
116
|
+
}
|
117
|
+
|
118
|
+
function chgColor(arg) {
|
119
|
+
if (arg.value === "green") {
|
120
|
+
document.getElementById("ttttt").style.color = "green";
|
121
|
+
} else if (arg.value === "blue") {
|
122
|
+
document.getElementById("ttttt").style.color = "blue";
|
123
|
+
} else if (arg.value === "black") {
|
124
|
+
document.getElementById("ttttt").style.color = "black";
|
125
|
+
} else if (arg.value === "red") {
|
126
|
+
document.getElementById("ttttt").style.color = "#ff0000";
|
127
|
+
|
128
|
+
}
|
129
|
+
}
|
130
|
+
```
|
83
131
|
※質問内容と関連のないコードは一部省略しております。
|