javascript play a sound when clicked code example
Example: javascript play sound onclick
var audio = new Audio("soundfile.wav");
document.onclick = function() {
audio.play();
}
var audio = new Audio("soundfile.wav");
document.onclick = function() {
audio.play();
}