we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "play audio on button click html"
Patience
26 Nov 2017
1var sound = new Audio("file.wav");
2
3button.addEventListener('click',()=>{
4	sound.currentTime = 0;
5	sound.play();
6});