function randomRedirect(){
var links = [
"results.html",
"results1.html",
"results2.html",
"results3.html"
];
//Get a random number between 0 and the number of items in links[]
var rnd = Math.floor((Math.random() * links.length));
if(rnd<links.length)
location = links[rnd];
else
location = links[0];
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.