Re: JavaScript Tutorial Question
by Christopher Higgs <c.higgs(at)landfood.unimelb.edu.au>
|
Date: |
Fri, 24 Sep 1999 14:42:16 +1000 |
To: |
Denise <denise(at)nf.sympatico.ca>, hwg-basics(at)mail.hwg.org |
In-Reply-To: |
denise |
|
todo: View
Thread,
Original
|
|
At 23:02 23/09/99 -0300, Denise wrote:
>What exactly does this line do?
> onMouseOver="temp=image1; image1=image2; image2=image3; image3=temp;
>document.the_image.src=image1;"
>onClick="document.brand_image.src=image1;">
Basically it is saying there are three images and it wants to cycle through
them. Therefore when the page is first sent to the browser:
image1 = 'thau.gif'
image2 = 'sky.gif'
image3 = 'monkey.gif'
When you click, then:
image1 = 'sky.gif'
image2 = 'monkey.gif'
image3 = 'thau.gif'
'sky.gif' is then swapped onto the page
On the second click:
When you click, then:
image1 = 'monkey.gif'
image2 = 'thau.gif'
image3 = 'sky.gif'
'monkey.gif' is then swapped onto the page
etc..etc..etc..
I didn't take a detailed look at the code, but that's what it appears to be
doing to me :)
Chris Higgs <c.higgs(at)landfood.unimelb.edu.au>
Institute of Land and Food Resources
University of Melbourne
http://www.landfood.unimelb.edu.au
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA