TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
31
22.8k
audio files overlapping.
May 15 2017 3:23 AM
<!DOCTYPE html>
<html>
<head>
<meta charset=
"utf-8"
/>
<title>RailwayAnnouncement</title>
</head>
<body>
<input id=
"TrainNumber"
type=
"text"
/>
<input id=
"Submit"
type=
"button"
value=
"Submit"
onclick=
"submit();"
/>
</body>
</html>
<script>
function submit() {
var TrainNumber = document.getElementById(
"TrainNumber"
).value;
var length = TrainNumber.length;
for
(var counter = 0; counter <= length - 1; counter++)
{
var trackNumber = TrainNumber[counter];
var audio =
new
Audio(trackNumber+
'.mp3'
);
audio.play();
}
}
</script>
Here is what I did. Audio files are overlapping. But I want them to play one after another. Help me with suggestions.
Reply
Answers (
0
)
Interview questions of HTML5
Html input file default button(choose file) color change..?