/ Published in: JavaScript
Expand |
Embed | Plain Text
<script language="JavaScript"> if (document.images) { pic1on = new Image(); pic1on.src = "images/pic1on.gif"; pic2on = new Image(); pic2on.src = "images/pic2on.gif"; pic3on = new Image(); pic3on.src = "images/pic3on.gif"; pic1off = new Image(); pic1off.src = "images/pic1off.gif"; pic2off = new Image(); pic2off.src = "images/pic2off.gif"; pic3off = new Image(); pic3off.src = "images/pic3off.gif"; } else { alert("Sorry, your browser does not support image rollovers. This feature will be turned off."); } function img_act(imgName) { if (document.images) { imgOn = eval(imgName + "on.src"); document [imgName].src = imgOn; } } function img_inact(imgName) { if (document.images) { imgOff = eval(imgName + "off.src"); document [imgName].src = imgOff; } } </script> <BODY>: <P><A HREF="link1" onMouseover="img_act('pic1')" onMouseout="img_inact('pic1')"><IMG BORDER="0" NAME="pic1" SRC="images/pic1off.gif"></A></P> <P><A HREF="link2" onMouseover="img_act('pic2')" onMouseout="img_inact('pic2')"><IMG BORDER="0" NAME="pic2" SRC="images/pic2off.gif"></A></P> <P><A HREF="link3" onMouseover="img_act('pic3')" onMouseout="img_inact('pic3')"><IMG BORDER="0" NAME="pic3" SRC="images/pic3off.gif"></A></P>
You need to login to post a comment.
