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

255
Views
Cómo seleccionar la etiqueta de entrada al presionar una tecla

Hola, tengo una lista de etiquetas de entrada, estoy navegando a través de todas las etiquetas de entrada usando las teclas de flecha arriba y flecha abajo. Quiero seleccionar la etiqueta de entrada al presionar la tecla Intro y comenzar a escribir.

 <input type="text" /> selected and start typing on keypress enter
about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

Prueba esto :

 var el = document.getElementById("myInputID"); el.addEventListener("keydown", function(event) { if (event.key === "Enter") { // Enter key was hit } });
about 4 years ago · Juan Pablo Isaza Report

0

imaginemos que tiene <div class="container"> con una lista de entradas:

 <div id="container"> <input type="text" value="1"> <input type="text" value="2"> <input type="text" value="3"> </div> document.getElementById('container').querySelectorAll('input').forEach((node) => { node.addEventListener('keydown', (event) => { if (event.key === 'Enter') { // your logic here } }) })
about 4 years ago · Juan Pablo Isaza Report

0

 <input type="text" id="text1"><script> window.addEventListener("keydown", (event)=>{if (event.key == 'Enter') {document.getElementById("text1").focus()} })</script>

pero esto funciona solo si tienes un elemento

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!