Jump to content

Rollover For Multiple Images Each Amount Of Time


houssam_ballout
 Share

Recommended Posts

Not quiet sure what you mean?, but guessing you mean something like this:replace array image files names to your own, and make <img> tag src image="filename" /> the same as first image listed in array.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title><script language="JavaScript">count=0;function timedCount(){imgarray = new Array("image01.jpg","image02.jpg","image03.jpg")document.images["foto"].src=""+imgarray[count]+"";count++;if(count>=imgarray.length){count=0;}setTimeout("timedCount()",5000); //1sec = 1000 so 5000 = 5 sec interval}window.onload=timedCount;</script></head><body><img name="foto" src="image01.jpg" height="75" width="100" alt="Image"></body></html>

Edited by dsonesuk
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...