Javascript - introduction

Where is that new world? [javascript image swap example]

East?     or     West?

Code for the above:
    <img src="qmark.jpg" width="100" height="157" id="whither" />

    <p align=center>
    <a href=""
    onmouseover="document.getElementById('whither').src='colonr.jpg'"
    >East?</a>
    or
    <a href=""
    onmouseout="document.getElementById('whither').src='colonl.jpg'"
    >West?</a>
    </p>

In the example above,

Rollovers

Combining two actions and two images:

...and you get a rollover image:
Peru SST unit

<a href=".."  
  onmouseout="document.getElementById('peru').src='perubw.jpg'">
  onmouseover="document.getElementById('peru').src='perucolor.jpg'">
<img src="perubw.jpg" id="peru" />
</a>


Javascript