Flying Lemurs: Fly for Fun

TUTORIALS


The Easiest Javascript
The easiest javascript is onmouseover.

Visit Flying Lemurs

This section goes in the header, between the head tags at the top of the page.

<script type="text/javascript">
function mouseOver()
{
document.firstbutton.src ="bluesquare.gif"
}
function mouseOut()
{
document.firstbutton.src ="redsquare.gif"
}
</script>

Within the header of the web page the functions allocate the appropriate image files. The "name" is "firstbutton" which is referenced in the body of the web page...

<a href="http://www.flyinglemurs.com" target="_blank"
onmouseover="mouseOver()"
onmouseout="mouseOut()">
<img border="0" alt="Visit Flying Lemurs"
src="redsquare.gif" name="firstbutton" /></a>

Set up the hyperlink in the first line, then the onmouseover and onmouseout variables are given the return values of the functions mouseOver() and mouseOut(). The initial image is referenced along with the "name" variable that is used in the original definition of the functions within the header of the web page.



Copyright 2008 Flying Lemurs.