<html> <body> <script type="text/javascript"> var r=Math.random() if (r>0.5){ document.write("<a href='http://www.java2java.com'>java2s</a>") }else{ document.write("<a href='http://www.google.ca'>Google!</a>") } </script> </body> </html>