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

167
Views
Mostrar el valor del campo de entrada en otro valor de opción de selección al cambiar el valor de entrada

Logré mostrar el valor de entrada en otra entrada usando el formulario HTML. Quiero mostrar los valores de entrada en los elementos de option de selección en lugar de la entrada 3 y la entrada 4.

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <form action="" method="post"> <input type="text" id="myInput1" onchange="myChangeFunction(this)" placeholder="FIRST " />` <input type="text" id="myInput3" onchange="myChangeFunction1(this)" placeholder="SECOND " /><br />

La entrada anterior se muestra en los campos de entrada siguientes.

 <br /> <input type="text" id="myInput2" /> <br /> <input type="text" id="myInput4" />

Pero quiero mostrar los valores myinput2 myinput4 anteriores en los valores de opción a continuación en el campo de selección cuando se escribe la entrada en myinput1 y myinput3.

 <select> <option>????? Here insert the value obtained at myInput2</option> <option>??? Here insert the value obtained at myInput4</option> </select> <script type="text/javascript"> function myChangeFunction(input1) { var p1 = document.getElementById("myInput2"); p1.value = input1.value; } function myChangeFunction1(input3) { var p2 = document.getElementById("myInput4"); p2.value = input3.value; } </script> </form>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Échale un vistazo

 function myChangeFunction(input1) { var p1 = document.getElementById("option1"); p1.value = input1.value; p1.innerHTML = input1.value } function myChangeFunction1(input3) { var p2 = document.getElementById("option2"); p2.value = input3.value; p2.innerHTML = input3.value }
 <form action="" method="post"> <input type="text" id="myInput1" onkeyup="myChangeFunction(this)" placeholder="FIRST " />` <input type="text" id="myInput3" onkeyup="myChangeFunction1(this)" placeholder="SECOND " /><br /> <select> <option id="option1">????? Here insert the value obtained at myInput2</option> <option id="option2">??? Here insert the value obtained at myInput4</option> </select> </form>

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!