Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title> Rimedi della nonna </title>
- </head>
- <body onload="init();">
- <img id="img" src="carbonara.jpg" height=600>
- <SCRIPT >
- var images;
- var currentImageIndex;
- function init()
- {
- currentImageIndex = 0;
- images = ["carbonara.jpg", "crostatafrutta.jpg", "lasagnebolognese.jpg"];
- window.setInterval(update, 1000);
- }
- function update()
- {
- if(currentImageIndex>=2)
- currentImageIndex=0;
- else
- currentImageIndex+=1;
- document.getElementById("img").src = images[currentImageIndex];
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement