WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Programmierung (http://www.wcm.at/forum/forumdisplay.php?f=17)
-   -   Bilder zufällig anzeigen (http://www.wcm.at/forum/showthread.php?t=15326)

Robert 28.02.2001 14:38

Gefunden!
 
Ich hab eins gefunden und wie man sieht ist es recht simpel - wie alles was funktioniert...

<script LANGUAGE="JavaScript">
<!--
var z= 5;
Bild = new Array(z);
Bild[0] = 'http://www.g2g.cc/shooter/highlight/0oni_max.jpg</A>';
Bild[1] = 'http://www.g2g.cc/shooter/highlight/0undying_max.jpg</A>';
Bild[2] = 'http://www.g2g.cc/shooter/highlight/0q3_max.jpg</A>';
Bild[3] = 'http://www.g2g.cc/shooter/highlight/0nolf_max.jpg</A>';
Bild[4] = 'http://www.g2g.cc/shooter/highlight/0alice_max.jpg</A>';


//-->
</script>

<script LANGUAGE="JavaScript">
<!--
var jetzt=new Date();
var z=(jetzt.getSeconds())%5;
document.write(Bild[z]);
//-->
</script>


Die Variable Z gibt an wie viele es sind - nicht vergessen bei
var z=(jetzt.getSeconds())%5;
ebnfalls die Anzahl einzutragen.


Alle Zeitangaben in WEZ +2. Es ist jetzt 09:27 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag