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

270
Visualizações
How to select specific value in a Query in HTML <script>

I need to know how to select a specific value in a form of a query. Under the Content.join('');, I need to select like 2 values which is the Hello and Lorem ipsum... then Hi and Nullam fringilla..., and so on.

Sorry, kinda new to this stuff as well.

   <script>
        var Count = 0;
        var title = document.getElementById("getTitle");
        var desc = document.getElementById("getDescription");
        var Content = [
            ["Option1", "Hello", "Lorem ipsum dolor sit amet"],
            ["Option2", "Hi", "Nullam fringilla imperdiet eleifend"],
            ["Option3", "Greetings", "Cras dapibus ipsum a consequat tincidunt"]];
                
                    function previewImg(DibsSrc){
                    document.getElementById("Dibs").src =DibsSrc.src;
                    Content[Count][0] = DibsSrc.id;
                    title.innerhtml = Content.join('');
                    desc.innerhtml = Content.join('');
                }
    </script>
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Content[0][1] or Content[Count][1] = Hello

Content[0][2] or Content[Count][2] = Lorem ipsum dolor sit amet

To check the next item you need to update the Count var with a +1.

Content[1][1] or Content[Count][1] = Hi

Content[1][2] or Content[Count][2] = Nullam fringilla imperdiet eleifend

Note that the count starts with 0, so your first item is 0 instead of 1.

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