Making an two images automatically alternate

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • econthecape
    New Member
    • Nov 2007
    • 1

    Making an two images automatically alternate

    I have two .gif images that I want to automatically alternate instead of only on a mouseover. Here's the coding so far:

    [HTML]<CENTER>
    <A HREF="http://en.wikipedia.or g/wiki/Christmas"
    onmouseover="do cument.mybutton 2.src='redgreen .gif';"
    onmouseout="doc ument.mybutton2 .src='greenred. gif';"><BR>
    <IMG SRC="greenred.g if" width="600" height="150"
    border="0" name="mybutton2 "></A>
    </CENTER>
    [/HTML]
    Anyone know how to make it on a timer or something to auto switch the images?
    Last edited by acoder; Nov 27 '07, 07:09 PM. Reason: Added code tags
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Use setInterval.

    Comment

    Working...