Current course:

Advanced Javascript Rollovers

The Code:

<head>
      <script type="text/javascript">

            function swapImage(element, image) {
                  document.getElementById(element).src = image;
            }
      </script>

</head>

<body>
      <a href="http://www.bgsu.edu" onmouseover="swapImage('myImage', 'images/tile2.jpg');" onmouseout="swapImage('myImage', 'images/tile1.gif');"><img id="myImage" src="images/tile1.gif" width="108" height="108" /></a>
</body>



The Example: