Search This Blog

Tuesday, April 2, 2013

Create Menu Using Javascript


First Create Six Images.
one.jpg
two.jpg


three.jpg
four.jpg


five.jpg
six.jpg



one and two for HOME
three and four for ABOUT
five and six for CONTACT

<html>
<head><title>Html Javascript </title>
<script = "text\javascript">
function f1()
{
img1.src="two.jpg";
}
function f2()
{
img1.src="one.jpg";
}
function f3()
{
img2.src="four.jpg";
}
function f4()
{
img2.src="three.jpg";
}
function f5()
{
img3.src="six.jpg";
}
function f6()
{
img3.src="five.jpg";
}

</script>
</head>
<body>
<img src="one.jpg" height="50px" width="150px" id="img1" alt="image" onmouseover="f1();" onmouseout="f2();" />
<img src="three.jpg" height="50px" width="150px" id="img2" alt="image" onmouseover="f3();" onmouseout="f4();" />
<img src="five.jpg" height="50px" width="150px" id="img3" alt="image" onmouseover="f5();" onmouseout="f6();" />

</body>
</html>

No comments:

Post a Comment