My code is as follows:
Javascript
<script language="javascript" type="text/javascript">
function changeImage(image)
{
document.getElementById('treatments').setAttribute('src','images/' + image + '.jpg');
}
</script>
HTML
<tr>
<td><a href="holistic.html" onmouseover="changeImange(holistic)">Holistic Therapy</a></td>
</tr>
<tr>
<td><img id="treatments" src = "images/beauty.jpg" width="250" height="250" alt="Treatments" /></td>
</tr>
I have seen this working on another site (http://jdstiles.com/java/hoverchangeimage.html#) but I cant seem to get it working.
What am I doing wrong?

New Topic/Question
Reply


MultiQuote




|