math.random()得到的数是0-1之间 得到1-7的随机数:Math.round((Math.random()*100))%7 转载于:https://www.cnblogs.com/JiangXiaoTian/articles/2696917.html