Sullivan Market

a web based full-circle development system



My JavaScript Tutorials - Image Rollovers

Here's the Javascript:

<script language="JavaScript">
<!--
img1on = new Image(184,125);
img1on.src = "img-one-on.jpg";
img1off = new Image(184,125);
img1off.src = "img-one-off.jpg";
img2on = new Image(100,136);
img2on.src = "img-two-on.jpg";
img2off = new Image(100,136);
img2off.src = "img-two-off.jpg";
img3on = new Image(159,100);
img3on.src = "img-three-on.jpg";
img3off = new Image(159,100);
img3off.src = "img-three-off.jpg";

//dummy functions do nothing when an image is clicked

function one() {}

function two() {}

function three() {}

// -->
</script>
<a href="javascript:one()" onMouseOver="document.one.src = img1on.src"
onMouseOut="document.one.src = img1off.src">
<IMG NAME=one src="img-one-off.jpg" height=125 width=184 > </a >

<a href="javascript:two()" onMouseOver="document.two.src = img2on.src"
onMouseOut="document.two.src = img2off.src">
<IMG NAME=two src="img-two-off.jpg" height=136 width=100 > </a >

<a href="javascript:three()" onMouseOver="document.three.src = img3on.src"
onMouseOut="document.three.src = img3off.src">
<IMG NAME=three src="omg-three-off.jpg" height=100 width=159 > </a >

Back To JavaScript Tutorials

©2012 SullivanMarket.com