x
 
<html>
<body>
<script type="text/vbscript">
randomize()
r=rnd()
if r>0.5 then
 document.write("<a href='http://www.w3school.com.cn'>学习 web 开发!</a>")
else
 document.write("<a href='http://www.microsoft.com'>访问微软!</a>")
end if
</script>
<p>
本例演示一个链接,该链接的地址是 W3School.com.cn 或者 microsoft.com。几率各占 50%。
</p>
</body>
</html>