PDA

View Full Version : DHTML problem!?


Nikki1987
12-12-2007, 08:40 PM
</style>
<script type="text/JavaScript">
<html>
<head>
<script type="text/javascript">
img2=new Image();
img2.src="../Images/xbox.jpg";
function changeImage()
{
document.getElementById('myImage').src=img2.src;
}
</script>
</head>

<body>

<p>When you mouse over the image, a new image will appear.</p>
<img id="myImage" onmouseover="changeImage()" border="0" width="160" height="120" src="../Images/wii-logo.jpg">
<p>The new image appears instantly, because your browser has already loaded the image.</p>

</body>
</html>

can anyone tell me why this isnt working?