Javascript Button Add sound to a button

PHOTO EMBED

Wed Dec 15 2021 22:51:57 GMT+0000 (UTC)

Saved by @Samo_Krose #javascript

var playBtn = document.getElementById('play');
var stopBtn = document.getElementById('stop');
var playSound = function() {
   audio.play();
};
playBtn.addEventListener('click', playSound, false);
stopBtn.addEventListener('click', function(){audio.pause()}, false);
content_copyCOPY

https://www.demo2s.com/javascript/javascript-button-add-sound-to-a-button.html