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

155
Vistas
How to group actions associated with <span id=

I attach the relevant extract of the code I am using. What I want to do with the 3 lines which begin "<span id =" is:

  1. to call ItemJ and then use the Item1, Item2 and Item3 links immediately below ItemJ in the section.
  2. to call ItemK and then use the Item1, Item2 and Item3 links immediately below ItemK in the section
  3. Ditto for the third line and ItemL.

The trouble is that it always picks the third group for Item1/2/3 - as I would expect as currently coded.

So is there a way of getting each "<span id=" line to select the group of Item1/2/3 associated with the IndexJ/K/L group I am calling. For various reasons I don't want to give the Item1/2/3 different numbers. Is there a kind of "If" statement I can use which will always select the group of Item/1/2/3 I want?

    <span id="ItemJ"></span><P>
    <span id="ItemK"></span><P>
    <span id="ItemL"></span><P>

    <script>

    document.getElementById("ItemJ").innerHTML = xBB
    document.getElementById("Item1").innerHTML = Bob110
    document.getElementById("Item2").innerHTML = ZZ1
    document.getElementById("Item3").innerHTML = RadioDGH

    document.getElementById("ItemK").innerHTML = xCC
    document.getElementById("Item1").innerHTML = Bob125
    document.getElementById("Item2").innerHTML = ZZ2
    document.getElementById("Item3").innerHTML = QARadio

    document.getElementById("ItemL").innerHTML = xAA 
    document.getElementById("Item1").innerHTML = Bob135
    document.getElementById("Item2").innerHTML = ZZ3
    document.getElementById("Item3").innerHTML = RadioDGH

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