Show a Random Link

Submitted by:Jhon Smith

Date added:29 December, 2011

Category:ASP

ASP code example for a random link, each time you load the page, it will display one of two links: Xentrik.net OR Xentrik Snippets.

Tags: random link

Code Snippet:

<html>
<body>

<%
randomize()
r=rnd()
if r>0.5 then
response.write("<a href='http://www.xentrik.net/'>Xentrik.net</a>")
else
response.write("<a href='http://www.xentrik.net/snippets/'>Xentrik Snippets</a>")
end if
%>

</body>
</html>
 
 

Comments