<html> <body> <% randomize() r=rnd() if r>0.5 then response.write("<a href='http://www.w3schools.com'>W3Schools.com!</a>") else response.write("<a href='http://www.refsnesdata.no'>Refsnesdata.no!</a>") end if %> <p> 本例演示了随机显示两个链接中的一个,两个链接各有50%的机率。 </p> </body> </html>
效果会显示在右边 Create by 软晨网(RuanChen.com)