Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>JSLabThree</title>
- </head>
- <body>
- <script>
- window.onload = function(){
- var image = document.getElementById("imgElement");
- var imgArray = ["images/", "images/", "images/"];
- var index = 0;
- function slideShow() {
- image.src = imgArray[index];
- index++;
- if(index >= imgArray.length){
- index = 0;
- }
- }
- setInterval(slideShow, 2000);
- }
- </script>
- <img id = "images/" width= "400"; height = "400" name="image"/>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement