0
how to play song in javascript
4 Respostas
+ 1
here is for "java"
there are other tags for "JavaScript"
0
var audio = new Audio('audio_file.mp3'); audio.play();
0
as I am new to java :|
0
hello
you can play sound with .play() function
<audio id="music">
<source src="beep.mp3" type="audio/mpeg">
</audio>
<button onclick="bell()"> Press Here</button>
</center>
<script type="">
var audio =document.getElementById("music");
function bell()
{
audio.play()
}
I hope it will help to you