You are here: irt.org | FAQ | DHTML | Q953 [ previous next ]
Try the following code:
<script language="JavaScript"><!-- if (document.images) { imageoff = new Image(); imageoff.src = 'imageoff.jpg'; imageon = new Image(); imageon.src = 'imageon.jpg'; } function change(image,ext,id) { if (document.layers) document.layers[id].document.images[image].src = eval(image + ext + ".src"); } //--></script> <layer id="id1"> <a href="nextpage.htm" onMouseOver="change('image','on','id1')" onMouseOut="change('image','off','id1')"><img name="image" src="imageoff.jpg" width="20" height="20" border="0" alt="Image"></a> </layer>