Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <audio id="myAudio" controls preload="none"> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> <p>Click the button to return the value of the preload attribute of the audio.</p> <button onclick="myFunction()">Try it</button> <p><b>Note:</b> The preload attribute is not supported in IE.</p> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myAudio").preload; document.getElementById("demo").innerHTML = x; } </script> </body> </html>