Przeglądarka małych zdjęć
Przeglądarka małych zdjęć w ramce sterowanej butonami
HEAD:
SCRIPT LANGUAGE="JavaScript"> < !-- Begin var Onerotate_delay = 2000; // delay in milliseconds (5000 = 5 secs) Onecurrent = 0; var OneLinks = new Array(3); OneLinks[0] = "http://www.infoprog.pl"; OneLinks[1] = "http://www.infoprog.pl"; OneLinks[2] = "http://www.infoprog.pl"; function Onenext() { if (document.Oneslideform.Oneslide[Onecurrent+1]) { document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent+1].value; document.Oneslideform.Oneslide.selectedIndex = ++Onecurrent; } else Onefirst(); } function Oneprevious() { if (Onecurrent-1 >= 0) { document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent-1].value; document.Oneslideform.Oneslide.selectedIndex = --Onecurrent; } else Onelast(); } function Onefirst() { Onecurrent = 0; document.images.Oneshow.src = document.Oneslideform.Oneslide[0].value; document.Oneslideform.Oneslide.selectedIndex = 0; } function Onelast() { Onecurrent = document.Oneslideform.Oneslide.length-1; document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value; document.Oneslideform.Oneslide.selectedIndex = Onecurrent; } function Oneap(text) { document.Oneslideform.Oneslidebutton.value = (text == "Stop") ? "Start" : "Stop"; Onerotate(); } function Onechange() { Onecurrent = document.Oneslideform.Oneslide.selectedIndex; document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value; } function Onerotate() { if (document.Oneslideform.Oneslidebutton.value == "Stop") { Onecurrent = (Onecurrent == document.Oneslideform.Oneslide.length-1) ? 0 : Onecurrent+1; document.images.Oneshow.src = document.Oneslideform.Oneslide[Onecurrent].value; document.Oneslideform.Oneslide.selectedIndex = Onecurrent; window.setTimeout("Onerotate()", Onerotate_delay); } } function Onetransport(){ window.location=OneLinks[Onecurrent] } // End --> < /SCRIPT> |
BODY:
<TABLE border="0" cellspacing="0" cellpadding="0"> <TR> <TD> <form name="Oneslideform" > <DIV align="center"> <TABLE width="150" border="1" cellspacing="0" cellpadding="4" bordercolor="#330099"> <TR> <TD bgcolor="#330099"> <DIV align="center"><B><FONT color="#FFFFFF">Image Slideshow</FONT></B></DIV> </TD> </TR> <TR> <TD bgcolor="#FFFFFF"> <DIV align="center"><A href="javascript:Onetransport()"><IMG src="/slideimage1.gif" width="90" height="90" name="Oneshow" border="0">[/url]</DIV> </TD> </TR> <TR> <TD bgcolor="#330099"> <DIV align="center"> <SELECT name="Oneslide" onChange="Onechange();"> <OPTION value="slideimage1.gif" selected>Image 1</OPTION> <OPTION value="slideimage2.gif">Image 2</OPTION> <OPTION value="slideimage3.gif">Image 3</OPTION> </SELECT> </DIV> </TD> </TR> <TR> <TD bgcolor="#330099"> <DIV align="center"> <INPUT type=button onClick="Oneprevious();" value="<<" title="Previous"> <INPUT type=button name="Oneslidebutton" onClick="Oneap(this.value);" value="Start" title="AutoPlay"> <INPUT type=button onClick="Onenext();" value=">>" title="Next"> </DIV> </TD> </TR> </TABLE> </DIV> </form> </TD> </TR> < /TABLE> < p>This free script provided by < a href="/www.infoprog.pl">JavaScript Kit[/url]</p> |