1,js如何产生一个随机数
<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);
};
</script>
2,用js绘图,还需精通算法,比如用JS画出光滑曲线,最好知道最小二乘法算法等等! |