Replace an Image under mouse event (onMouseOver, onMouseOut) : img « HTML Tags « JavaScript Tutorial
- JavaScript Tutorial
- HTML Tags
- img
<HTML>
<HEAD>
</HEAD>
<BODY>
Pass your mouse over a pattern!
</H2>
<TABLE cellpadding=5 cellspacing=10>
<TR><TD>
<IMG src="white.gif" height=100 width=175 border=0>
</TD>
<TD>
<IMG src="1.gif" height=75 width=75 border=2 onMouseOver="document.images[0].src='1.gif'";
onMouseOut="document.images[0].src='2.gif';">
</TD>
<TD>
<IMG src="2.gif" height=75 width=75 border=2
onMouseOver="document.images[0].src='2.gif';"
onMouseOut="document.images[0].src='3.gif';">
</TD>
<TD>
<IMG src="4.gif" height=75 width=75 border=2
onMouseOver="document.images[0].src='4.gif';"
onMouseOut="document.images[0].src='5.gif';">
</TD>
<TD>
<IMG src="6.gif" height=75 width=75 border=2
onMouseOver="document.images[0].src='6.gif';"
onMouseOut="document.images[0].src='7.gif';">
</TD>
</TR>
</TABLE>
</BODY>
</HTML>