Random phrase or picture (Click Refresh to see the changing)
You can make phrase-of-day, image-of-day - play!
Random phrase
<HTML><HEAD></HEAD><BODY> <script language=JavaScript><!-- var ah=new Array() // We create some phrases ah[0] ="First phrase" ah[1] ="Second phrase" ah[2] ="Third phrase " //We choose random number of row of string array var rN = Math.floor((ah.length)*Math.random()); document.write(ah[rN]) // and insert it where you want //Dictum sapienti sat--></script></BODY></HTML>
Random picture
Variant 1 We can insert in text of program next tag : ah[0] ="<IMG SRC=myimage.gif>" <script language=JavaScript><!--// Variant 2 //if names of pictures(images) different only on number var quant=9 // quantity of pictures var rN = Math.floor(quant*Math.random());//We choose random digit //and make tag from constant part and random digit document.write('<IMG SRC=myimage' + rN + '.gif>') //--></SCRIPT><!--Dictum sapienti sat.--></BODY></HTML>
Galiel.net 2000