Script Categories

Menus and Navigation >>> Random Page.

An easy way to instantly send the visitor to a random HTML page. Just enter the random pages you want to use, and you're done!

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">      
/* Visit for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
var howMany = 2;  // max number of items listed below
var page = new Array(howMany+1);


function rndnumber(){
var randscript = -1;
while (randscript < 0 || randscript > howMany || isNaN(randscript)){
randscript = parseInt(Math.random()*(howMany+1));
return randscript;
quo = rndnumber();
quox = page[quo];
document.write("[ You would have been taken to <tt>" + quox + "</tt> ]");
//document.location=quox; Your random page;
// End -->

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.

Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).