Random number generator
This basically creates a random number with the function rand(n) which returns a number from 0 to n-1, click here to refresh page to see a new number.
Source for Random Number Generator:
<HTML>
<HEAD>
<TITLE>Random Number Generator</TITLE>
<!-- PUT IN HEAD // -->
<script language="JavaScript">
<!--
function rand(n) {
seed = (0x015a4e35 * seed) % 0x7fffffff;
return (seed >> 16) % n;
}
var now = new Date()
var seed = now.getTime() % 0xffffffff
// -->
</script>
</HEAD><BODY>
<!-- PUT IN BODY // -->
<script language="JavaScript">
<!--
document.write("<B>", rand(100), "</b>");
// -->
</script>
</BODY>
</HTML>