Back to Scripts page
Click in the text area below, select all and copy to grab the script
Script listing:
<HTML> <HEAD> <TITLE>Combining rollovers & image maps</TITLE> <SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> <!-- Hide script from old browsers if (document.images) { img1 = new Image img2 = new Image img3 = new Image imgRed = new Image img1.src = "images/testGreen1.gif" img2.src = "images/testGreen2.gif" img3.src = "images/testGreen3.gif" imgRed.src = "images/testRed.gif" } else { img1 = "" img2 = "" img3 = "" imgRed = "" document.roll = "" } // End hiding script from old browsers --> </SCRIPT> </HEAD> <BODY BGCOLOR=WHITE> <MAP NAME="roll_map"> <AREA SHAPE=RECT HREF="sec1.html" onMouseover="document.roll.src=img1.src" onMouseout="document.roll.src=imgRed.src" COORDS="0,0,120,60"> <AREA SHAPE=RECT HREF="sec2.html" onMouseover="document.roll.src=img2.src" onMouseout="document.roll.src=imgRed.src" COORDS="0,60,120,120"> <AREA SHAPE=RECT HREF="sec3.html" onMouseover="document.roll.src=img3.src" onMouseout="document.roll.src=imgRed.src" COORDS="0,120,120,180"> </MAP> <A HREF="home.html" onMouseout="document.roll.src=imgRed.src"><IMG USEMAP="#roll_map" SRC="images/testRed.gif" WIDTH=120 HEIGHT=180 BORDER=0 NAME="roll" ALIGN=LEFT HSPACE=20></A> <H3>Thanks for visiting our site. You'll find some of the best JavaScript information on the Web right here, much of which we also put into our book, JavaScript for the World Wide Web, Visual QuickStart Guide, Third Edition, published by Peachpit Press. You can find out more by clicking on the info box to the left.</H3> </BODY> </HTML>