Answers for "sound on click html"

3

javascript play sound onclick

var audio = new Audio("soundfile.wav");

document.onclick = function() {
  audio.play();
}
Posted by: Guest on June-06-2020
0

html sound

<audio controls>
  <source src="horse.ogg" type="audio/ogg">
  <source src="horse.mp3" type="audio/mpeg">
  Your browser does not support the audio tag.
</audio>
Posted by: Guest on March-14-2021

Code answers related to "sound on click html"

Code answers related to "Javascript"

Browse Popular Code Answers by Language