得到区间【m,n】之间的随机数
Math.round(Math.random()*(n-m)+m);
round方法会对括号内的数进行四舍五入
random方法会生成一个0到1之间的随机值
posted on 2017-02-26 21:51 .smile 阅读(165) 评论(0) 收藏 举报