Webwork
/
Random Images on Reload



To randomize the images either reload the page or click here.

Head:
<script language="javascript">
random.m=714025; random.a=4096; random.c=150889;
random.seed = (new Date()).getTime()%random.m;
function random()
{
random.seed = (random.seed*random.a + random.c) % random.m;
return random.seed / random.m;
}

function randomizeimages()
{
randomizeimage('image1', 6, '', '.jpg');
randomizeimage('image2', 6, '', '.jpg');
randomizeimage('image3', 6, '', '.jpg');
randomizeimage('image4', 6, '', '.jpg');
randomizeimage('image5', 6, '', '.jpg');
randomizeimage('image6', 6, '', '.jpg');
}

function randomizeimage(img, count, base, type)
{
document.images[img].src = base + Math.floor(random() * count + 1) + type
}
</script>

Body:
<body onload="randomizeimages()">

<img src="1.jpg" height="150" name="image1"> <img src="1.jpg" height="150" name="image2"> <img src="1.jpg" height="150" name="image3"> <img src="1.jpg" height="150" name="image4"> <img src="1.jpg" height="150" name="image5"> <img src="1.jpg" height="150" name="image6">

<p style="text-align: center">To randomize the images either reload the page or <a href="javascript:;" onClick="randomizeimages()">click here</a>.</p>
Previous | Webwork Table of Contents | Next >
photographs:

Semblance Portrait Project
The Built World
Greece
Hungary/Czech Republic
Poland
Graffiti
Simple Truths
Israel


Paris
Puebla, Mexico
Spain
Along the Mississippi
Italy
Santa Fe
The Reliance Building
Providence
archive:

Webwork
The Web Page from Hell
The Portals Project
Transition
Insights
Internet Spelling Guide
Ape Silverback (Primate Ruminations)
Revenge of the Movie Poster
GIFs 4 Us
The Web Rules
Webpix
Backgrounds 4 Us
Webpaper
Digital Sketches
Fonts
Sounds
© Jay Boersma   See also jayboersma.com