Back to Scripts page
Click in the box below, select all and copy to grab the script
<HTML> <HEAD> <TITLE>Image Test</TITLE> <SCRIPT LANGUAGE=JAVASCRIPT> <!-- Hide script from old browsers // This script copyright 1997, Tom Negrino and Dori Smith. // This script is from "JavaScript for the WWW, Visual QuickStart Guide, 2nd Ed." // For more information, see <http://www.chalcedony.com/javascript/>. // This script may be used and modified, but the copyright notice must remain intact. var myPix = new Array("mars.gif","jupiter.gif","saturn.jpg") function choosePic() { if (document.images) { randomNum = Math.floor((Math.random() * 10)) % 3 document.myPicture.src = myPix[randomNum] } } // End hiding script from old browsers --> </SCRIPT> </HEAD> <BODY BGCOLOR="WHITE" onload="choosePic()"> <IMG SRC="spacer.gif" WIDTH="200" HEIGHT="200" NAME="myPicture"><p> </BODY> </HTML>