Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | DOM Audio load() Method

  • Last Updated : 30 Mar, 2021

The Audio load() method is used for reload the audio element. The Audio load() method is used to update the audio element after changing the source or other settings. The Audio load() method does not accept any parameters and does not return any values.



Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.


<!DOCTYPE html>
<body style="text-align:center;">
    <h1 style="color:green">GeeksforGeeks</h1>
    <h2>HTML DOM Audio load() Method</h2>
    <button onclick="my_Audio()" type="button">
        Change Audio
    <audio id="my_Audio" controls autoplay>
        <source id="mp4_src" src=
        <source id="ogg_src" src=
        function my_Audio() {
            document.getElementById("ogg_src").src =
            document.getElementById("mp4_src").src =


Supported Browsers: The browsers supported by HTML DOM Audio load() Method are listed below: 

  1. Google Chrome
  2. Opera
  3. Mozilla Firefox


My Personal Notes arrow_drop_up
Recommended Articles
Page :