Image Animation : Image Img : HTML JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » HTML » Image Img »

 

Image Animation




<html>
<head>
<script language="JavaScript">
<!--
 var alternate = 0;
 var timerId;
 var images = new Array("yb.gif""rb.gif");        // Image URLs 
 function startAnimation() {
    alternate = (alternate == 00;           // Alternate images
    document.images[0].src = images[alternate];     // Update image
    timerId = setTimeout("startAnimation()"1000)// 1 second update
 }
//-->
</script>
</head>
<body>
<img border=hspace=width=10 src="http://www.navioo.com/style/logo.png">Hover over 
<a href="#" onMouseOver="startAnimation()" onMouseOut="clearTimeout(timerId)">
this</a> link to start the animation.<p>
</body>
</html>


           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo HTML
» Image Img