Javascripts > Javascript Links > Random Link Wheel
Script Title: Random Link Wheel
Description: Give the Link Wheel script a spin, and see which site you end up in!
Example: Available
Java-Scripts.net Dynamic Drive Code Arena Myzips.com Freewarejava.com Website Abstraction
Copy the following code between the <BODY></BODY> tags of your html page.<script> /* Wheel of links script By Website Abstraction (http://wsabstract.com) and Java-Scripts.net (http://www.java-scripts.net) */ var count=0 function dothis(){ setTimeout("document.wheel.wheel2.selectedIndex =1000",100) setTimeout("document.wheel.wheel2.selectedIndex =count",200) setTimeout("document.wheel.wheel2.selectedIndex =1000",300) setTimeout("document.wheel.wheel2.selectedIndex =count",400) setTimeout("document.wheel.wheel2.selectedIndex =1000",500) setTimeout("document.wheel.wheel2.selectedIndex =count",600) setTimeout("window.location = document.wheel.wheel2.options[document.wheel.wheel2.selectedIndex].value",800) } function animate(){ var countfinal = Math.round(Math.random()*(document.wheel.wheel2.length-1)) document.wheel.wheel2.selectedIndex =count if (count==countfinal){ dothis() return } if (count<document.wheel.wheel2.length) count++ else count=0 setTimeout("animate()",50) } </script> <form method="POST" name="wheel"> <div align="center"><center><p><select name="wheel2" size="6"> <option value="http://java-scripts.net">Java-Scripts.net <option value="http://www.dynamicdrive.com">Dynamic Drive <option value="http://www.codearena.com">Code Arena <option value="http://www.myzips.com">Myzips.com <option value="http://www.freewarejava.com">Freewarejava.com <option value="http://www.wsabstract.com">Website Abstraction </select></p> </center></div> <div align="center"> <center><p><input type="button" value="Spin wheel!" name="B1" onClick="animate()"></p> </center></div> </form>
Enter your name and email address to have this script sent right to your Inbox for later viewing. First Name Last Name Email