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

118
Visualizações
Same form but with another names and functions

my english is not so good but I'll try my best to explain my problem.

So i want to use this model

  <h1 id="modal-title" class="unlock-page__title" style="text-align: center;">Tittle</h1>
            <div id="modal-description" style="color: rgb(174, 174, 174); text-align: center; white-space: pre-line; margin-top: 5px;">middle text</div>

<div style="margin: 80px 0 8px;">
<input id="modal-input" type="text" placeholder="name">
</div>

<div id="modal-submit" onclick="sendMessage()" class="bg-blue white btn">next</div>

And after i add a text on input and press next, everything needs to remain the same and not redirect to a new page, but update the text in the form to ask for a new prompt.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

First, you have to define the Function 'sendMessage'. Then inside the function you have to fetch the input value and store it in a variable, then you can change the value of the title and the description.

    <h1 id="modal-title" class="unlock-page__title" style="text-align: center;">Tittle</h1>
                <div id="modal-description" style="color: rgb(174, 174, 174); text-align: center; white-space: pre-line; margin-top: 5px;">middle text</div>
    
    <div style="margin: 80px 0 8px;">
    <input id="modal-input" type="text" placeholder="name">
    </div>
    
    <div id="modal-submit" onclick="sendMessage()" class="bg-blue white btn">next</div>
    
    
    <script>
    let title = document.getelementbyid('modal-title').value;
    
    function sendMessage(){
        let inputText = document.getelementbyid('modal-description').value;
        document.getElementById('modal-title').value = inputText;
    }
    </script>
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