<html>
<head>
<script type="text/javascript">
function mouseOver()
{
document.b1.src ="rose1.jpg";
}
function mouseOut()
{
document.b1.src ="rose2.jpg";
}
</head>
<body>
<img border="0" alt="Visit W3Schools!" src="rose1.jpg" name="b1"
onmouseOver="mouseOver()" onmouseOut="mouseOut()" />
</body>
</html>
javascript help
Started by hkp, Jun 03 2009 09:48 PM
2 replies to this topic
#1
Posted 03 June 2009 - 09:48 PM
hello friends, I have tried to create that when courser on the image the it show another image. I have used that javascript code. But that is not working can you help me what is the wrong in this code.
|
|
|
#2
Posted 03 June 2009 - 10:36 PM
<html>
<head>
<script type="text/javascript">
function mouseOver(i) {
i.src = "http://www.olive-trees.net/_borders/Legends%20rose.jpg";
}
function mouseOut(i) {
i.src = "http://www.boston.com/ae/theater_arts/exhibitionist/miniature-rose-1.jpg";
}
</script>
</head>
<body>
<img border="0" alt="Visit W3Schools!" src="http://www.boston.com/ae/theater_arts/exhibitionist/miniature-rose-1.jpg" id="b1"
onmouseOver="mouseOver(this)" onmouseOut="mouseOut(this)" />
</body>
</html>
Try this on for size.
#3
Posted 04 June 2009 - 10:55 PM
Thanks for the replay I have tried this code And it is working. Thanks once again to solving my problem..


Sign In
Create Account


Back to top










