Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

137
Views
Why html element audio tag can't change the value?
GET_PLAY_BTN.addEventListener("click", () => {
      
      isClicked += 1;
      if (isClicked == 1) {
        GET_PLAY_BTN.style.backgroundImage = "url('../stylesheets/img/icon/play.png')";
        
           GET_TEXT.innerHTML = "Now Playing";
        
        if (GET_SONG_TITLE.innerHTML == GET_HIDDEN_TITLE.innerHTML) {
         
         switch (GET_HIDDEN_GENRE.innerHTML) {
           case "ROCK":
             GET_AUDIO.innerHTML = `<source src="../src/asset/rock/${GET_HIDDEN_TITLE.innerHTML}.mp3" type="audio/mp3">`;
             GET_AUDIO.play();
           break;
           case "POP":
             GET_AUDIO.innerHTML = `<source src="../src/asset/pop/${GET_HIDDEN_TITLE.innerHTML}.mp3" type="audio/mp3">`;
             GET_AUDIO.play();
           break;
         }
      

I don't know why the audio tag value is not changed when I manipulate the source tag, the value of source is changed but the, first value still there, what should I do to, remove the value of the audio tag, and removed forever

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!