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

258
Views
¿Cómo pausar la función js hasta que el usuario presione el botón?

Tengo un botón html en mi sitio y quiero que mi función js se detenga hasta que el usuario lo presione. onclick="nextFunction()" no me ayuda porque necesito continuar en la misma función. ¿Qué tengo que hacer?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede llamar a una función después de un tiempo usando setTimeout.

 const someFunction = () => { // do some stuff before setTimeout('function that you want to execute after the pause', 3000 ); // the time is in miliseconds // some stuff after }

En su caso, si no me equivoco, hay un oyente llamado onmousedown, que ejecuta algo mientras se presionan las cosas. https://www.w3schools.com/jsref/event_onmousedown.asp

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!