Math.round(Math.random()*x);
Math.round(Math.random()*(y-x)+x);
Math.ceil(Math.random()*x);
随机数Math.random()公式
原文:http://www.cnblogs.com/sese/p/6396818.html