随机生成10-100之间的数

Math.random()                                        [ 0 , 1 )

Math.floor(Math.random()*10)                  [ 0 , 9 ]

(Math.floor(Math.random()*10)+1)*10      [ 10 , 100 ]

posted @ 2016-08-12 16:30  huerge  阅读(1553)  评论(0编辑  收藏  举报