Random URL Script


SUBMITTED BY: Guest

DATE: Feb. 19, 2015, 5:57 a.m.

FORMAT: Text only

SIZE: 879 Bytes

HITS: 10202

  1. <script>
  2. <!--
  3. /*
  4. Random link button- By JavaScript Kit (http://javascriptkit.com)
  5. Over 300+ free scripts!
  6. This credit MUST stay intact for use
  7. */
  8. //specify random links below. You can have as many as you want
  9. var randomlinks=new Array()
  10. randomlinks[0]="http://freewarejava.com"
  11. randomlinks[1]="http://javascriptkit.com"
  12. randomlinks[2]="http://dynamicdrive.com"
  13. randomlinks[3]="http://cnn.com"
  14. randomlinks[4]="http://www.geocities.com"
  15. function randomlink(){
  16. window.location=randomlinks[Math.floor(Math.random()*randomlinks.length)]
  17. }
  18. //-->
  19. </script>
  20. <form method="post">
  21. <p><input type="button" name="B1" value="Random Link >>" onclick="randomlink()"></p> </form>
  22. <!--Uncomment below to use a regular text link instead
  23. <a href="javascript:randomlink()">Random Link</a>
  24. -->

comments powered by Disqus