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