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

164
Views
Texto "Barra de progreso"

Soy un principiante con Javascript y quería agregar solo una pequeña barra de progreso falsa basada en texto a mi sitio.

Esto es lo que probé:

 function progbar(){ document.getElementById("bar").innerHTML = "Ladevorgang: "; for (var i = 0; i<100; i++) { adprogress(); sleep(50); } //document.getElementById("bar").innerHTML = ""; } function adprogress(){ document.getElementById("bar").innerHTML += "|"; } function sleep(milliseconds) { var start = new Date().getTime(); for (var i = 0; i < 1e7; i++) { if ((new Date().getTime() - start) > milliseconds){ break; } } }

El problema es que no hace esto:

Ladevorgang:|

Mensaje:||

Mensaje:|||

Mensaje:||||

y así

simplemente espera y luego muestra la cosa completa.

¿Es así como funciona Javascript o hay algo que no veo?

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!