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

259
Views
Cómo seleccionar un valor específico en una consulta en HTML <script>

Necesito saber cómo seleccionar un valor específico en forma de consulta. Bajo Content.join(''); , necesito seleccionar como 2 valores que son Hola y Lorem ipsum... luego Hola y Nullam fringilla... , y así sucesivamente.

Lo siento, un poco nuevo en esto también.

 <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] o Content[Count][1] = Hola

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

Para verificar el siguiente elemento, debe actualizar Count var con un +1.

Content[1][1] o Content[Count][1] = Hola

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

Tenga en cuenta que el conteo comienza con 0, por lo que su primer elemento es 0 en lugar de 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!