Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript play sound onclick

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

document.onclick = function() {
  audio.play();
}
 
PREVIOUS NEXT
Tagged: #javascript #play #sound #onclick
ADD COMMENT
Topic
Name
7+3 =