|
Combining
Rollover With an Image Map
You can use this JavaScript to Change the Back Ground color
automatically.
<HTML>
<HEAD>
<TITLE>Combining rollovers & image maps</TITLE>
<SRIPT LANGUAGE=JAVASCRIPT>
if (document.images)
{
img1 = new Image
img2 = new Image
img3 = new Image
imgBlue = new Image
imgRed = new Image
img1.src = "testGreen1.gif"
img2.src = "testGreen2.gif"
img3.src = "testGreen3.gif"
imgBlue.src = "testBlue.gif"
imgRed.src = "testRed.gif"
}
else
{
img1 = ""
img2 = ""
img3 = ""
imgHlue = ""
imgRed = ""
document.roll = ""
}
</SCRIPT>
</HEAD>
BODY BGCOLOR=WHITE>
<P><TABLE HORDER=0>
<TR>
<TD WIDTH="132">
<P><AHREF="home.html"onmouseover="document.roll.src=imgBlue.src"
onmouseout="document.roll.src=imgRed.src"'
<MAP NAME="roll_test">
<AREA SHAPE=RECT COORDS="0,0,120,60" HREF="sec1.HTML"onmouseover="document.roll.src=img1.src"'>
<AREA SHAPE=RECT COORDS="0,60,120,120" HREF="sec2.HTML"onmouseover="document.roll.src=img2.src"'>
<AREA SHAPE=RECT COORDS="0,120,120,1E0" HREF="sec3.HTHL"onmouseover="document.roll.src=img3.src"'
</MAP>
<IMG USEMAP="#roll test" SRC="testRed.gif"
WIDTH=120 HEIGHT=180 HORDER=0 ALIGN=bottom name=roll></A>
</TD><TD VALIGN=top>
<H3>Thanks for visiting SmartSurat.com site. You'll find some of
the best JavaScript information on the Web Site here.</H3>
</TD></TR>
</TABLE></P>
</BODY>
</HTML>
|