How do you generate a random number from JavaScript?
Created May 7, 2012
John Zukowski You can either get the time and manipulate that to give you something random or call Math.random():
<script language="JavaScript"><!-- today = new Date(); num = today.getTime(); num = Math.round(Math.abs(Math.sin(num) * 1000000)); rand = Math.random()*1000000; randInt = Math.floor(rand); // --></script>