please help this newbie T_T

windows

Guest
can anyone give/show me source code where<br />
I put random pictures on top<br />
and random quotes on the bottom?<br />
<br />
so its like... (lol =X)<br />
<br />
--------<br />
|%%%%|<br />
|%%%%| <-random picture<br />
|%%%%|<br />
|%%%%|<br />
--------<br />
-blahblah- <--- random quote<br />
<br />
thank you alot and have a nice day<!--content-->This bit of script in the head is to put the sources of your images into, along with their corresponding comments:<br />
<br />
<br />
<br />
var imgarray = new Array();<br />
imgarray[imgarray.length] = new Array("default.png","Picture 1"); // Add the sources to all of the images here.<br />
imgarray[imgarray.length] = new Array("1.png","Picture 2");<br />
imgarray[imgarray.length] = new Array("2.png","Picture 3");<br />
imgarray[imgarray.length] = new Array("3.png","Picture 4");<br />
<br />
This bit of script in the body generates a random number and uses it to write the code for the image and comment:<br />
<br />
<br />
<br />
var num=Math.floor(Math.random()*imgarray.length);<br />
document.write('<img src=http://www.webdeveloper.com/forum/archive/index.php/"'+imgarray[num][0]+'" border="0" id="change" alt="Rotate Image"></a><br>');<br />
document.write('<p>'+imgarray[num][1]+'</p>');<!--content-->
 
Back
Top