+ 1
How to make play sound(mp3) button in javascript?
Javascript Button Sound
2 odpowiedzi
0
var audio = new Audio("path/to/audio.mp3");
var btn = document.getElementById("btn");
btn.addEventListener("click", function(){ audio.play()});
Javascript Button Sound