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

78
Views
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 answers
Answer question

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 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!