FAREBNE PRECHODY

ID
Nazov / Name:
Popis / Description:
Dlzka / Length:
Testovane pod / Tested under:

 

083
p083.html / p083.zip
Viacero farebnych prechodov
1917b
NN 4.04, IE 4.0

UKAZKA / CLICK HERE

Zdrojovy tvar / Source code:

<html> <head> <title> JavaScript DESTINATION - P083 </title> <script language="JavaScript"> <!-- function cols(c1, c2, c3, c4, c5, c6, c7){ this.c1 = c1; this.c2 = c2; this.c3 = c3; this.c4 = c4; this.c5 = c5; this.c6 = c6; this.c7 = c7; } rainbow = new cols("red", "orange", "yellow", "green", "blue", "indigo", "violet"); fade = new cols("white", "DDDDDD", "BBBBBB", "999999", "777777", "555555", "333333", "black"); greens = new cols("darkgreen", "forestgreen", "green", "lawngreen", "lightgreen", "limegreen", "palegreen"); sunset = new cols("skyblue", "slateblue", "violet", "darkorange", "red", "darkred", "black"); psyc = new cols("violet", "lawngreen", "violet", "lawngreen", "violet", "lawngreen", "violet"); function cycle(type){ scheme = type; document.bgColor = scheme.c1; timerID=setTimeout('document.bgColor = scheme.c2', document.selector.interval.value * 10); timerID=setTimeout('document.bgColor = scheme.c3', document.selector.interval.value * 20); timerID=setTimeout('document.bgColor = scheme.c4', document.selector.interval.value * 30); timerID=setTimeout('document.bgColor = scheme.c5', document.selector.interval.value * 40); timerID=setTimeout('document.bgColor = scheme.c6', document.selector.interval.value * 50); timerID=setTimeout('document.bgColor = scheme.c7', document.selector.interval.value * 60); } // --> </script> </head> <body> <FORM NAME="selector"> Zvolte si farebnu schemu: <INPUT TYPE="button" VALUE="Duha" onClick="cycle(rainbow)"> <INPUT TYPE="button" VALUE="Prechod na ciernu" onClick="cycle(fade)"> <INPUT TYPE="button" VALUE="Zelena" onClick="cycle(greens)"> <INPUT TYPE="button" VALUE="Zapad slnka" onClick="cycle(sunset)"> <INPUT TYPE="button" VALUE="Psycho" onClick="cycle(psyc)"><P> Udaj interval zmeny farieb (1/10 sekundy): <INPUT TYPE="text" SIZE="8" NAME="interval" VALUE="50"> </FORM> </body> </html>
[ Navrat / BACK ]