Pagina 1 van 1
random pictures in html...
Geplaatst: 03 jul 2005, 12:20
door gies
Mijn forum wordt geredirected van de index.html naar de portal.php.
in de index.html staat een plaatje:
<body text="888888">
<center>
<img align="center" src="
http://www.thealtar.nl/phpBB2/images/thealtar.PNG">
</center>
Hoe kan ik meerdere plaatjes hierin zetten die random worden gekozen ?
bedankt
Re: random pictures in html...
Geplaatst: 03 jul 2005, 13:06
door svenn
gies schreef:Mijn forum wordt geredirected van de index.html naar de portal.php.
in de index.html staat een plaatje:
<body text="888888">
<center>
<img align="center" src="
http://www.thealtar.nl/phpBB2/images/thealtar.PNG">
</center>
Hoe kan ik meerdere plaatjes hierin zetten die random worden gekozen ?
bedankt
effe google jo
Code: Selecteer alles
<SCRIPT language=JavaScript>
<!--
/*
-------------------------------------------------------------------------------------------------
Random Image/Link JavaScript(tm) by Jim Matvichuk
This code may be used freely as long as this copyright notice remains with the code.
Copyright© 1997, Jim Matvichuk Jim_Matvichuk@compuserve.com All rights reserved
Last Revision: August 19, 1997
-------------------------------------------------------------------------------------------------
*/
G_total_sa = 0;
G_day = new Date();
G_seed = 1+G_day.getTime();
ae_('<IMG SRC="picture1.jpg">');
ae_('<IMG SRC="picture2.jpg">');
ae_('<IMG SRC="picture3.jpg">');
function ae_ (random_item) {
G_total_sa++;
sa [G_total_sa] = random_item;}
function rand() {
RN = parseInt(((G_seed - (parseInt(G_seed/1000,10) * 1000))/10)/100*G_total_sa + 1,10);
return RN;}
function sa () {}
//-->
</SCRIPT>
in de header
in het body
Code: Selecteer alles
<SCRIPT LANGUAGE="JavaScript">
document.write (sa[rand(G_total_sa)]);
</SCRIPT>
Geplaatst: 03 jul 2005, 13:42
door gies
Tja, ik ben een leek in html.
Dus snap nog niet echt wat je bedoelt.
hier is mijn hele html, waar moet ik dan wat neerzetten, en waar komen de randompictures dan te staan en met welke naam ???
Code: Selecteer alles
<head>
<title>The Altar - Old School Never Dies!</title>
<meta name="description" content="The Altar, Old School Never Dies!. We offer you online gaming, downloadable games, ascii art, cool pictures, oldschool & forum. It's time to sacrifice!">
<meta name="keywords" content="online arcade games forum download ascii zack phpbb oldschool amiga">
<META
http-equiv="refresh" content="0;URL=http://www.thealtar.nl/phpBB2/portal.php">
</head>
<body bgcolor="#000000">
<body text="888888">
<center>
<img align="center" src="http://www.thealtar.nl/phpBB2/images/thealtar.PNG">
</center>
</body>
</html>
heel erg bedankt!
Geplaatst: 03 jul 2005, 16:36
door svenn
vindt
ervoor voeg toe
Code: Selecteer alles
<SCRIPT language=JavaScript>
<!--
/*
-------------------------------------------------------------------------------------------------
Random Image/Link JavaScript(tm) by Jim Matvichuk
This code may be used freely as long as this copyright notice remains with the code.
Copyright© 1997, Jim Matvichuk Jim_Matvichuk@compuserve.com All rights reserved
Last Revision: August 19, 1997
-------------------------------------------------------------------------------------------------
*/
G_total_sa = 0;
G_day = new Date();
G_seed = 1+G_day.getTime();
ae_('<IMG SRC="http://www.thealtar.nl/phpBB2/images/thealtar1.PNG" alt="phpbb">');
ae_('<IMG SRC="http://www.thealtar.nl/phpBB2/images/thealtar2.PNG" alt="phpbb">');
ae_('<IMG SRC="http://www.thealtar.nl/phpBB2/images/thealtar3.PNG" alt="phpbb">');
function ae_ (random_item) {
G_total_sa++;
sa [G_total_sa] = random_item;}
function rand() {
RN = parseInt(((G_seed - (parseInt(G_seed/1000,10) * 1000))/10)/100*G_total_sa + 1,10);
return RN;}
function sa () {}
//-->
</SCRIPT>
zoek
Code: Selecteer alles
<img align="center" src="http://www.thealtar.nl/phpBB2/images/thealtar.PNG">
vervang met
Code: Selecteer alles
<SCRIPT LANGUAGE="JavaScript">
document.write (sa[rand(G_total_sa)]);
</SCRIPT>
Geplaatst: 03 jul 2005, 23:23
door gies
Hartstikke bedankt!!!