Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

257
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!