ParlandoSparlando


Related links:

 

Javascript: random images

This script is used to produce random images for each web page.

The script consists of two parts: the first one within the section, and the other one within the section.

This script is compatible with Explorer, Netscape 6, Mozilla, Safari, Opera.





Part one within the section of your page:



< script language="JavaScript" type="text/JavaScript" >

< /script >





Part two within the section of your page (where you want the image to be displayed):



< script language="JavaScript" type="text/JavaScript" >
document.write(image[increment]);
< /script >




Here is the url to the script in .txt file



Analysis of the script


The image() function is a array containing the picture links of your web site.

Thanks to the random() method, the image() function can choose one random picture.

The document.write method displays the picture chosen in the web page.

05/10/2005
Copyright © 2000-2008 Parlandosparlando



Versione sito italiana