Spaces:
Running
Running
Update index.html
Browse files- index.html +4 -8
index.html
CHANGED
|
@@ -230,22 +230,18 @@ Good to see you!
|
|
| 230 |
|
| 231 |
let number = 0
|
| 232 |
for (let word of words){
|
| 233 |
-
//
|
| 234 |
const button = document.createElement('button');
|
| 235 |
const spk = number
|
| 236 |
-
//
|
| 237 |
button.textContent = "#"+spk.toString()+" "+word;
|
| 238 |
button.style ="margin:4px;"
|
| 239 |
|
| 240 |
-
//
|
| 241 |
button.onclick = () => tts(word, spk);
|
| 242 |
|
| 243 |
-
// ラベルを作成(オプション)
|
| 244 |
-
//const label = document.createElement('span');
|
| 245 |
-
//label.className = 'button-label';
|
| 246 |
-
//label.textContent = 'Label1'; // ラベルテキストは固定値としている
|
| 247 |
|
| 248 |
-
//
|
| 249 |
container.appendChild(button);
|
| 250 |
number +=1
|
| 251 |
if (number>108){
|
|
|
|
| 230 |
|
| 231 |
let number = 0
|
| 232 |
for (let word of words){
|
| 233 |
+
// Create Button
|
| 234 |
const button = document.createElement('button');
|
| 235 |
const spk = number
|
| 236 |
+
// Set Button Text
|
| 237 |
button.textContent = "#"+spk.toString()+" "+word;
|
| 238 |
button.style ="margin:4px;"
|
| 239 |
|
| 240 |
+
// add click event
|
| 241 |
button.onclick = () => tts(word, spk);
|
| 242 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 243 |
|
| 244 |
+
// add button to dom
|
| 245 |
container.appendChild(button);
|
| 246 |
number +=1
|
| 247 |
if (number>108){
|