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

203
Vistas
How to get radio buttons to work within document.getElementById

The html code in the "document.getElementById" section will work when it is stand along, but although it produces the radio buttons when nested inside "document.getElementById" the buttons don't work. I wonder if its to do with nesting the "document.getElementById"

     <span id="Item1"></span>

     <script>

     document.getElementById("Item1").innerHTML = '<center><table bgcolor="#ddceff" width="550" border="2"><TR><TD><center>TEST<BR><audio id="player" src="https://media.radiodgh.com:8443/stream"></audio><div><button onclick="document.getElementById("player").play()">Play</button><button onclick="document.getElementById("player").pause()">Pause</button><button onclick="document.getElementById("player").volume += 0.1">Vol +</button><button onclick="document.getElementById("player").volume -= 0.1">Vol -</button></div></center></font></center></TD></TR></TABLE>'

     </script>
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I needed to use the backslash ( \ ) escape character to prevent JavaScript from interpreting a quote as the end of the string. Hence the references to ('player') have to be ([backslash]'player[backslash]').

about 4 years ago · Juan Pablo Isaza Denunciar
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