Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

play audio on click javascript

<button onclick="playSound()">Play</button>

<script>
let playSound = () => new Audio("src.mp3").play();
</scirpt>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #play #audio #click #javascript
ADD COMMENT
Topic
Name
1+7 =