代码如下: script language="JavaScript" !-- rnd.today=new Date(); rnd.seed=rnd.today.getTime(); function rnd() { rnd.seed = (rnd.seed*9301+49297) % 233280; return rnd.seed/(233280.0); }; function rand(number) { return Math.ceil(rnd()*n
代码如下:
<script language="JavaScript"><!--
rnd.today=new Date();
rnd.seed=rnd.today.getTime();
function rnd()
{
rnd.seed = (rnd.seed*9301+49297) % 233280;
return rnd.seed/(233280.0);
};
function rand(number)
{
return Math.ceil(rnd()*number);
};
document.write(rand(100000));
-->
</script>