Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

173
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda