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

188
Views
¿Por qué mi función setInterval no se ejecuta más de una vez?

No sé por qué mi función no se llama correctamente cada 100 milisegundos. Solo se llama una vez, cuando la página se carga/recarga. No tengo ideas de qué probar.

 var unit = document.getElementsByClassName('unit'); var date = new Date(); function setTime() { hour.textContent = date.getHours(); unit[0].textContent = "h"; minute.textContent = date.getMinutes(); unit[1].textContent = "m"; console.log('boom'); } setInterval(setTime, 100);
 <h1 id="time"> <span id="hour"></span><!-- --><span class="unit"></span> <span id="minute"></span><!-- --><span class="unit"></span> </h1>

about 4 years ago · Santiago Gelvez
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!