Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

156
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda