Rollover Buton (resimli)
Sayfalarında rollover buton kullanmak isteyenlere güzel bir örnek.
ÖRNEK
<script language="JavaScript"> // Your images! Img1=new Image();Img1.src="up.gif"; Img2=new Image();Img2.src="down.gif"; // Your Text style, 1-7 only! fnt='Verdana'; clr='#D9DD82'; sz=2; // Button layout! use standard HTML. // "<BR>" to stack. // "<P>" to stack with space between. // " " for inline. separate="<P>"; // Nothing needs altering past here! function N(name){document.images[name].src=Img1.src} function Y(name){document.images[name].src=Img2.src} function DrawEm(Url,Id,Txt){ document.write(" "//Alignment in NS wont work without this! +" <a href='"+Url+"' onMouseOver="Y('"+Id+"')" onMouseOut="N('"+Id+"')">" +" <img src="+Img1.src+" border='0' align='absmiddle' name='"+Id+"'></a> " +"<font face="+fnt+" size="+sz+" color="+clr+"> "+Txt+" </font>"+separate+" "); } // --> </script>
<script language="JavaScript"> /* The buttons, add as many as needed. The single letters are the button id's, each one must be different or an error will occur at that point. */ DrawEm("http://www.yahoo.com","a","Yahoo"); DrawEm("http://www.google.com","b","Google"); DrawEm("http://www.altavista.com","c","AltaVista"); DrawEm("http://www.lycos.com","d","Lycos"); DrawEm("http://www.hotbot.com","e","Hotbot"); // --> </script>
Copyright © 2002-2004 www.javascriptbankasi.com.tr.tc
Mail:javascriptbankasi@hotmail.com