0

How to add music in JavaScript ? And i cant put any image in html .

I know how to add an image in html but i cant . I want to add this one https://goo.gl/images/D2fZ6Z but i cant . And i know nothing about how to put music in javascript . Please help me

30th May 2018, 4:18 PM
ivankoshan
ivankoshan - avatar
3 Answers
+ 2
<audio id="audio"> <source src="test.mp3" /> </audio> <button onClick="test()">plat</button> <script> function test(){ var audio= document.getElementById('audio'); audio.play(); } </script>
30th May 2018, 4:31 PM
Sudarshan Rai
Sudarshan Rai - avatar
30th May 2018, 4:33 PM
Sudarshan Rai
Sudarshan Rai - avatar