Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

193
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda