小于任意数字的随机数

0~10的随机数

10*Math.random()

0~7的随机数

7*Math.random()

0~2的随机数

2*Math.random()

posted @ 2016-09-26 13:00  飘然离去  阅读(257)  评论(0)    收藏  举报