Make your own free website on
Click the Image!

This is a cute script. You click the picture, and it changes the image. Try clicking the image to the right... you should see Demando carrying Safiru away...
click here!
In the HEAD tag

<script language="JavaScript"> <!-- Hide this script from old browsers --
function pickimg(){
var imagenumber = 5 ;
var randomnumber = Math.random() ;
var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1;
images = new Array
images[1] = "demando1.jpg"
images[2] = "demando2.jpg"
images[3] = "demando1.jpg"
images[4] = "demando2.jpg"
images[5] = "demando1.jpg"
var image = images[rand1]
document.randimg.src = image
// -- End Hiding Here -->

In the BODY tag
<body onLoad="pickimg()">

The IMAGE tag
<a href="" onClick="pickimg();return false;">
<img src="" width="150" height="100" alt="click here!" border="0" name="randimg"></a>
.. Merc-chan's note: I only have 2 switching images, but you can have EVEN more than 2 or 5. under the "images[1]" tag thingy and the "var imagenumber= 5;" You can go ahead and change it however you want... again, cute script ne?

Javascript :: We-bu-pee-ji