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

253
Views
Mostrar/ocultar múltiples imágenes en secuencia con JS

Tengo un código de trabajo para a) hacer clic en un botón, b) mostrar una imagen para n ms, c) luego ocultarlo:

 <html> <body> <h1>Test</h1> <p><b>Display Image </b></p> <p>Click on button to display the image.</p> <!-- button --> <button id="btnId1">100 ms</button> <!-- image to hide and show --> <img src="img/img-a.jpg" alt="" id="imageID1" width="300" height="300" style="display: none" /> <script> // add click event to button document.getElementById("btnId1").addEventListener('click', function() { //show image document.getElementById('imageID1').style.display='block'; // hide image after 100 ms. setTimeout(function() { document.getElementById('imageID1').style.display='none'; }, 100); }); </body> </html>

Lo que me gustaría hacer es

a) Haga clic en el botón, b) muestre y oculte varias imágenes .jpg en secuencia , y c) tenga el control de cada imagen sobre cuánto tiempo mostrarla

He buscado en temas/publicaciones similares pero no he encontrado lo que estoy buscando.

Gracias de antemano por cualquier aporte, -- JW

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!