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

386
Views
Cómo configurar la escucha de eventos para la tecla 'Enter' en textarea con js

Estoy haciendo un sitio web temático de terminal.

hasta ahora probé esto

 textArea.addEventListener('keypress', function (e) { if (e.key === 'Enter') { runCommand(textArea.value); textArea.value = ""; } })

pero después de ejecutar un comando, el cursor de Textarea se mueve a una nueva línea y el caso del interruptor deja de funcionar. ¿Cómo restablecer el Textarea por completo o usar la tecla Intro sin pasar a la nueva línea?

about 4 years ago · Juan Pablo Isaza
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!