SHARE
TWEET

Untitled

a guest Jul 17th, 2017 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2.   <head>
  3.   <title>Image Rotate
  4.   </head>
  5.  
  6.   <body>
  7.   <img src="" name="Rotating" id="Rotating1" width=100 height=100>
  8.   <img src="" name="Rotating" id="Rotating2" width=100 height=100>
  9.  
  10.  
  11.   <script language="JavaScript">
  12.   var ImageArr1 = new Array("Picture(3).jpg","Picture(1).jpg","Picture(2).jpg");
  13.   var ImageHolder1 = document.getElementById('Rotating1');
  14.  
  15.   var ImageArr2 = new Array("Picture(5).jpg","Picture(6).jpg","Picture(7).jpg");
  16.   var ImageHolder2 = document.getElementById('Rotating2');
  17.  
  18.   function RotateImages(whichHolder,Start)
  19.   {
  20.     var a = eval("ImageArr"+whichHolder);
  21.     var b = eval("ImageHolder"+whichHolder);
  22.     if(Start>=a.length)
  23.         Start=0;
  24.     b.src = a[Start];
  25.     window.setTimeout("RotateImages("+whichHolder+","+(Start+1)+")",1500);
  26.   }
  27.  
  28.   RotateImages(1,0);
  29.   RotateImages(2,0);
  30.  
  31.   </script>
  32.  
  33.   </body>
  34.   </html>
RAW Paste Data
Top