View Full Version : Random Page....


jenners2003
07-02-2003, 05:05 PM
how do you make it so the page is a random page......like you dont know what page it will be???whats the code or where can i get it???

amicus
07-02-2003, 05:34 PM
i'm not sure what you mean but you can make a link be random. just put this into the page where you want the link to go.

<script language="javascript">
var r = Math.random();
var url = "http://www.yourpagename.com";

if ( r > .5 ) {
url = "http://www.yourotherpagename.com";
}

document.write( "<a href='" + url + "'>Text Shown</a>" );
</script>