Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

162
Vistas
Switch between pages with JS

I have three webpage links, i want to switch between the pages after 30secs.

How do I do this with HTML/JS?

Use Case:

start with page abc.com
after 30secs, switch to page dfe.com
after 30secs, switch to page ghi.com 
return to page abc.com and start from above again with the timer

Thank you

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Your script on each page will look something like this:

<script>
    window.onloadend = () => {
        setTimeout(() => {
            location.href = "page_to_next_page";
        }, 30000); // 30000ms = 30s
    }
</script>

Here, setTimeout is used to delay execution of the function inside of it by the duration specified in milliseconds.

You'll need to add this on each page but take note this will cause the site to redirect without any interaction from the user.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda