JAVASCRIPT 4
[Requires a browser that supports JavaScript.]
A sample navigation bar.
<html> <head> <title>A Navigation Bar </title> <script language="JavaScript"> <!-- Hide. net3 = 0; if((navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 3) || (navigator.appName=="Microsoft Internet Explorer" && parseInt(navigator.appVersion) >= 4)){ net3 = 1; } if(net3){ image1=new Image(); image1.src="on1.gif"; image2=new Image(); image2.src="off1.gif"; image3=new Image(); image3.src="on2.gif"; image4=new Image(); image4.src="off2.gif"; image5=new Image(); image5.src="on3.gif"; image6=new Image(); image6.src="off3.gif"; } function show(x) { if(net3) { if (x=="1") document.images[0].src=image1.src; if (x=="2") document.images[0].src=image2.src; if (x=="3") document.images[1].src=image3.src; if (x=="4") document.images[1].src=image4.src; if (x=="5") document.images[2].src=image5.src; if (x=="6") document.images[2].src=image6.src; } } // End hide. --> </script> </head> <body> <a name="button" href="#button" onmouseover="show(1)" onmouseout="show(2)"> <img src="off1.gif" width="60" height="20" border="0"> </a> <a href="#button" onmouseover="show(3)" onmouseout="show(4)"> <img src="off2.gif" width="60" height="20" border="0"> </a> <a href="#button" onmouseover="show(5)" onmouseout="show(6)"> <img src="off3.gif" width="60" height="20" border="0"> </a> </body> </html>
Pass the mouse cursor over the images in the right frame.
The links above are dummies; clicking them has no effect.
Copyright © 2000 P.J. LaBrocca. http://LaBrocca.com