|
Q1134 How can I swap one image to the same highlighted image over many different links?
irt.org | Knowledge Base | JavaScript | Image | Q1134 [ previous next ]
Q1134 How can I swap one image to the same highlighted image over many different links?
Try:
<script language="JavaScript"><!--
function swapOn() {
if (document.images)
document.imageName.src='image2.gif'
}
function swapOff() {
if (document.images)
document.imageName.src='image1.gif'
}
//--></script>
<img src="image1.gif" name="imageName" width="100" height="100">
<a href="page1.htm" onMouseOver="swapOn()" onMouseOut="swapOff()">text link 1</a>
<a href="page2.htm" onMouseOver="swapOn()" onMouseOut="swapOff()">text link 2</a>
<a href="page3.htm" onMouseOver="swapOn()" onMouseOut="swapOff()">text link 3</a>
<a href="page4.htm" onMouseOver="swapOn()" onMouseOut="swapOff()">text link 4</a>
|
|
|
Copyright © 1996-2008 irt.org, All Rights Reserved.