Image substitute : img : HTML Tags JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » HTML Tags » img »

 

Image substitute

















<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!--
if (document.images)
{
    img1 = new Image;
    img2 = new Image;
    img1.src = "http://www.navioo.com/style/logo.png";
    img2.src = "img2.gif";
}
else
{
    img1 = "";
    img2 = "";
    document.imgSwap = "";
}
//  -->
</script>
</head>
<body>
<a href="http://www.navioo.com" onMouseover="document.imgSwap.src = img2.src" onMouseout="document.imgSwap.src = img1.src">
<img src="http://www.navioo.com/style/logo.png" name="imgSwap" border="0" width=100 height=100>
</a>
</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo HTML Tags
» img