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

192
Vistas
How to click on a button(no Id in tag) in html page after 5 seconds when page is loaded

A boog noob Alert!...I've html div like this

<div class="col mt-2">
<button @click="selected = Array.from(header); render()" class="btn btn-light-alt btn-sm">Select all</button>
<button @click="selected = []" class="btn btn-light-alt btn-sm">Clear selection</button></div>
    

All I want to do is click on this Select all button after 5 seconds webpage is loaded. I've searched for this way to do it & I found this

setTimeout(document.getElementByID('button').click(),5000);

I think button is Id here???...But there is no Id in my html tag...we can see only class is available...so can I achieve this requirement?...Any similar threads that you guys know?

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

0

If you can't modify the HTML, and that button's function is always the same, then you don't actually need to trigger the click. Just run the functions.

setTimeout(function(){
   selected = Array.from(header);
   render();
},5000);
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