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

166
Views
How to move to the page entered in the form

let me start by saying that I'm a freshman. I would like to create a form with a button that, when pressed, will generate a page written in an inputa. How to do it? example:

<form action="" method="post">
  <!-- a hidden input -->
  <input type="hidden" name="a_hidden_input"/>
  
  <!-- a text input -->
  <input type="text" name="a_text_input"/>

  <!-- submit button -->
  <input type="submit" value="Submit"/>
</form>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This is the basic example for getting your data and displaying in the page .

<head>
    <script>
        function generate() {
            debugger
            var strText = document.getElementById("txtName").value;
            var strText1 = document.getElementById("txtEmail").value;
            document.getElementById("p1").innerHTML = strText;
            document.getElementById("p2").innerHTML = strText1;
            window.location.href = "http://mywebsite.com/home.html";
        }
    </script>
</head>
<body>
    <form>
        <input type="text" name="Name" id="txtName" placeholder="Name">
        <input type="text" name="Email" id="txtEmail" placeholder="Email">
        <input type="button" value="Submit" id="btnSubmit" onclick="generate()">
    </form>
    <div>
        <h1>New Page</h1>
        <p id="p1"></p>
        <p id="p2"></p>
    </div>
</body>

If u use any library like react js or framework like angular with backend technologies like php,nodejs, with databases as sql , mongodb or firebase it will be super easy for u .

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!