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

236
Views
¿Cómo cambio el texto de un elemento a través de JavaScript?
<section id="section1" data-nav="Section 1" class="your-active-class"> <div class="landing__container"> <h2>Section 1</h2> <p>Lorem ipsum dolor sit amet</p> <p>Aliquam a convallis justo.</p> </div> </section>

Probé textContent e innerHTML, traté de obtener el elemento por ID, clase y etiqueta, pero nada funciona. Estoy bastante seguro de que me estoy perdiendo algo. ¿Cómo podría cambiar los párrafos dentro de los títulos y también los propios títulos?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Pruebe este código, pegue el atributo de identificación de su párrafo dentro de la cosa getElementById.

 var paragraph = document.getElementById("id-of-your-paragraph"); paragraph.innerHTML = "Hello its a new text!";
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!