URL Array
<HTML> <HEAD> <SCRIPT language="JavaScript"> <!-- var rand_url= new Array() rand_url[0]="http://www.java2s.com"; rand_url[1]="http://www.java2s.com"; rand_url[2]="http://www.ad-help.com"; rand_url[3]="http://www.yahoo.com"; rand_url[4]="http://www.java2s.com"; var rand_num= Math.floor(Math.random()*5); //--> </SCRIPT> </HEAD> <BODY> <H2>List of Cars:</H2> <SCRIPT language="JavaScript"> <!-- document.write("<A HREF='"+rand_url[rand_num]+"'>"+rand_url[rand_num]+"</A>"); //--> </SCRIPT> </BODY> </HTML>