NAHODNE OBRAZKY

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

 

116
p116.html / p116.zip
Nahodne zobrazovanie obrazkov
980b
NN 4.04, IE 4.0

UKAZKA / CLICK HERE

Zdrojovy tvar / Source code:

<html> <head> <title> JavaScript DESTINATION - P116 </title> <script language="JavaScript"> <!-- var id,last=0,speed; compat = false; if (parseInt(navigator.appVersion)>=3) compat=true; function rnd(scale) { var dd=new Date(); return((Math.round(Math.abs(Math.sin(dd.getTime()))*8.71*scale)%scale)); } function speedf() { speed=document.ok.speed.value; } function stop() { clearTimeout(id); } function start() { var next=rnd(10); while(next==last) next=rnd(10); last=next; if (compat) { document.images[0].src="images/dg"+next+".gif"; id=setTimeout("start()",speed); } } // --> </script> </head> <body onload="speedf();start()" onunload="stop()"> <center> <h2>Nahodne zobrazovanie obrazkov</h2> <form name="ok">Rychlost: <input type="text" name="speed" size="6" value="2000"> ms <input type="button" value="OK" onclick="speedf()"> </form> <img src="images/dg0.gif" width=32 height=42> </center> </body> </html>
[ Navrat / BACK ]