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

80
Visualizações
Transfer input value

I have a problem with my web site when I use a form with 2 input I want to transfer the value of the 1st input to the 2nd input with minus sign without using the submit button,knowing that I used the php and js. Please if any of you have an answer I really need it.

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

0

Not sure if I understood your question right but if so this is what you are looking for using javascript

<html>
<head>
<script>
function setSecondField(value){
document.getElementById("field2").value = value.value+'-';
}
</script>
</head>
<body>

   
<input type="text" name="title" id="field1" class="text_box" oninput="setSecondField(this)" />

<input type="text" name="title" id="field2" class="text_box" "/>

</body>
</html>

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