| Welcome to WebmasterWorld Guest from 188.8.131.52 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|I need to create a onMouseOver that will change gif's randomly|
New to web programming
I would like to create a onMouseOver that will display a different image on each mouseover and change to the default onMouseOut
Welcome to WebmasterWorld hogman,
You want to have a rollover button that when you rollover it, it will chose a random image to swap, then switch back to the original?
Yes that is exactly what I am looking for.
var images = new Array ()
images[images.length] = '<URL for img1>'
images[images.length] = '<URL for img2>'
images[images.length] = '<URL for imgN>'
toChange.src = images[Math.floor(Math.random()*images.length)]
<img src="<img-file>" alt="" onmouseover="randomised(this)" onmouseout="this.src='<img-file>'">
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved