![]() |
|
|
+ Search |
![]()
|
Apr 30th, 2000 06:10
Martin Honnen,
Well you make an array of img urls e.g.
var images = new Array (
'whatever.gif',
'whatelse.gif',
'whateverelse.gif'
);
and then use
http://www.faqts.com/knowledge-base/view.phtml/aid/889/fid/142
to get a random index into that array:
var randomIndex = Math.floor(images.length * Math.random());
and then you document.write the IMG tag
document.write('<IMG SRC="' + images[randomIndex] + '">');