Hey all,
I'm new to java script, and really don't know anything about it. I'm
looking to have a random link shown on my site. I want the link to be chosen
from a list of about 10 links.
How would I go about this? I found this piece of code, but this only allows
two links. Does anyone know how to expand on this to add 10 or more?
<script type="text/javascript">
var r=Math.random()
if (r>0.5)
{
document.write("<a href='http://www.w3schools.com'>Learn Web
Development!</a>")
}
else
{
document.write("<a href='http://www.refsnesdata.no'>Visit Refsnes
Data!</a>")
}
</script>
Thanks for any help,
--
Global_Killa
"You're a victim of the rules you live by!"