質問編集履歴

1

インデント付けとスペルミス修復

2021/09/08 12:19

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -26,11 +26,11 @@
26
26
 
27
27
  music.addEventListener("ended", function () {
28
28
 
29
- music.pause();
29
+ music.pause();
30
30
 
31
- console.log('音楽終わり\nmusic2の再生!!');
31
+ console.log('音楽終わり\nmusic2の再生!!');
32
32
 
33
- music2();
33
+ music2();
34
34
 
35
35
  }, false);
36
36
 
@@ -38,21 +38,21 @@
38
38
 
39
39
  function music2(){
40
40
 
41
- var music2 = new Audio('naka1.mp3');
41
+ var music2 = new Audio('naka1.mp3');
42
42
 
43
- music2.play();
43
+ music2.play();
44
44
 
45
- console.log('music2の再生');
45
+ console.log('music2の再生');
46
46
 
47
- music2.addEventListener("ended", function () {
47
+ music2.addEventListener("ended", function () {
48
48
 
49
- music2.pause();
49
+ music2.pause();
50
50
 
51
- console.log('音楽終わり\nmusic3の再生!!');
51
+ console.log('音楽終わり\nmusic3の再生!!');
52
52
 
53
- music3();
53
+ music3();
54
54
 
55
- }, false);
55
+ }, false);
56
56
 
57
57
  }
58
58
 
@@ -60,39 +60,39 @@
60
60
 
61
61
  function music3(){
62
62
 
63
- var music3 = new Audio('naka2.mp3');
63
+ var music3 = new Audio('naka2.mp3');
64
64
 
65
- music3.play();
65
+ music3.play();
66
66
 
67
- music3.addEventListener("ended", function () {
67
+ music3.addEventListener("ended", function () {
68
68
 
69
- music3.currentTime = 0;
69
+ music3.currentTime = 0;
70
70
 
71
- music3.play();
71
+ music3.play();
72
72
 
73
- console.log('ループ中...');
73
+ console.log('ループ中...');
74
74
 
75
- }, false);
75
+ }, false);
76
76
 
77
77
  }
78
78
 
79
79
  function start() {
80
80
 
81
- if (started == undefined){
81
+ if (started == undefined){
82
82
 
83
- var started;
83
+ var started;
84
84
 
85
- music.play();
85
+ music.play();
86
86
 
87
- console.log('[再生]');
87
+ console.log('[再生]');
88
88
 
89
- var started = "abc";
89
+ var started = "abc";
90
90
 
91
- }else{
91
+ }else{
92
92
 
93
- aleat('再生中...');
93
+ aleat("再生中...");
94
94
 
95
- }
95
+ }
96
96
 
97
97
  }
98
98