Need help with random java script
I am looking for a random link generator script.
Something like the Random button here - http://www.funsnap.org/.
For me it is important the script not to repeat the links. Is it even possible -
Using the Math.random does not guarantee that a link will not be repeated.
</script>
var randomlinks=new Array()
randomlinks[0]="http://freewarejava.com"
randomlinks[1]="http://javascriptkit.com"
function randomlink(){
window.location=randomlinks[Math.floor(Math.random()*randomlinks.length)]
}
</script>
Any help is most appreciated.
-
thememass -
Thanks
{{ DiscussionBoard.errors[8569217].message }} -