Javascript examples for DOM HTML Element:Audio
Audio loop Property - Find out if the audio should start playing over again every time it is finished:
<!DOCTYPE html> <html> <body> <audio id="myAudio" controls loop> <source src="your.ogg" type="audio/ogg"> <source src="your.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio>/* w ww . ja v a 2 s.c o m*/ <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myAudio").loop; document.getElementById("demo").innerHTML = x; } </script> </body> </html>