As the title says i'd like to have a image (mocha1150.Gif) and when the mouse moves over them id like them to change to mocha5150ani.Gi f and when the mouse moves out id like to change it back to mocha1150.Gif
I already have the code written can someone please tell me whats wrong with it?
also if theirs a way to do it without creating a function and doing it within the element can someone please tell me how?
I already have the code written can someone please tell me whats wrong with it?
Code:
<html> <head> <script type="text/javascript"> function moveover(imga,ida) { document.getElementById('ida').src="imga"; } function moveout(imgb,idb) { document.getElementById('idb').src="imgb"; } </script> </head> <div style="position:absolute;top:20px;left:20%" align="center"><font face="arial" id="title" size="20" >Welcome to Spencer's Test website</font></div> <img src="top.GIF" width="100%" height="75px" /> <br> <img id="aa" src="mocha1150.GIF" onmouseover="moveover(mocha5150ani.GIF,aa)" onmouseout="moveout(mocha1150.GIF,aa)" /> <html>
Comment