JavaScript - URL Rotator Code


SUBMITTED BY: Guest

DATE: Sept. 16, 2014, 7:14 p.m.

FORMAT: JavaScript

SIZE: 195 Bytes

HITS: 4984

  1. var urls = new Array();
  2. urls[0] = "http://www.google.com";
  3. urls[1] = "http://www.ebay.com";
  4. var random = Math.floor(Math.random()*urls.length);
  5. window.location = urls[random];

comments powered by Disqus