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

362
Views
Cómo mostrar la entrada del usuario de una página html a otra página html (javascript)

Tengo una página HTML (test.html)

 <!DOCTYPE html> <html lang="en"> <head> <title>test</title> </head> <body> <input type="text" id="input-text" placeholder="Enter Text here"> <!--input text--> <input type="button" id="btn" onclick="addText()" > <!--call function--> <button ><a href="test2.html">Next Page</a></button> <!--get to new html page--> </body> <script src="app.js"></script> </html>

y otro HTML (test2.html)

 <!DOCTYPE html> <html lang="en"> <head> <title>test2</title> </head> <body> <h1 id="header">Display input here</h1> </body> <script src="app.js"></script> </html>

Quiero pasar de una página a la otra. La primera página tiene una entrada y la segunda página debe mostrar la entrada realizada por el usuario en la primera página. Este es el JavaScript:

 function addText() { document.getElementById('header').innerHTML =document.getElementById('input-text').value; }

¿Cómo mostrar mi entrada de usuario desde la página de prueba a la página test2?

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

0

Cree un objeto JSON para almacenar los datos en localStorage. Luego extraiga esos datos del objeto cuando cargue la página siguiente.

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!