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

157
Visualizações
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 à 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