Código:
Pero no es lo q busco, ya q la musica arranca cdo das click en la imagen, supuestamente la solucion esta aca: [URL="https://stackoverflow.com/questions/33509248/play-a-random-music-from-my-playlist-onclick-image"]https://stackoverflow.com/questions/33509248/play-a-random-music-from-my-playlist-onclick-image[/URL] , pero no entiendo nada yo jajaj<html> <head> <title>Untitled Document</title> </head> <script> var sounds = [ "01.mp3", "02.mp3", "03.mp3", "04.mp3", "05.mp3", ]; function StartOrStop(audioFile) { var audie = document.getElementById("myAudio"); if (audie.paused) { audie.src = sounds[Math.floor(Math.random() * sounds.length)]; audie.play(); } else { audie.pause(); } } </script> <img src="https://www2.pic-upload.de/thumb/14.05.16/8wk26swjd3i9.jpg" onclick="StartOrStop()")]; width="165px" height="190px" > <audio id="myAudio"></audio> </body> </html>
Ojala puedan ayudarme!!