Java Script

Skryptomania

Losowe obrazki i linki

Kod skryptu:

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

//*****************************************************************

//

//                 Random Image/Link Generator

//

//           by Crugi

//

//   Original generator by Paul Houle  (ph18@cornell.edu)

//

//****************************************************************

var number=5;

var random_number=0;

today=new Date();

jran=today.getTime();

ia=9301;

ic=49297;

im=233280;

jran = (jran*ia+ic) % im;

random_number=Math.ceil( (jran/(im*1.0)) *number);

image = new Array(5);

link = new Array(5);
 
 

image[0] = "cat01.gif";

link[0] = "http://www.lodz.pl";

image[1] = "cat04.gif";

link[1] = "http://www.krak.gazeta.pl/KiB/";

image[2] = "cat06.gif";

link[2] = "http://www.daewoo.com.pl";

image[3] = "donald.gif";

link[3] = "http://www.bmw.com";

image[4] = "fred.gif";

link[4] = "http://www.sony.com";

function viewSource()

   {

   var current_url="";

   current_url=document.location;

   window.location="view-source:"+current_url;

   }

</SCRIPT>

<BODY><SCRIPT language="JavaScript">

document.open();

document.write("<CENTER><A HREF='"+link[random_number-1]+"'><IMG SRC="+image[random_number-1]+" WIDTH=50 HEIGHT=50 BORDER=0></A><BR><BR>");
document.write("</CENTER>");

</SCRIPT></BODY>

A to s╣ obrazki jakie u┐y│em w tym skrypcie:

Masz jakie£ pytania to:

Poprzedni skrypt

NastΩpny skrypt

cruger@friko2.onet.pl

Kalendarz

Animowany zegar