Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

136
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda