摘要: 获取一个整数的JS代码 使用Math.floor(Math.random())获取一个想要的范围内的整数 例如:获取一个1~52之间的整数 用Math.random()*52获取一个>=0且<52的数 然后Math.random()*52+1得到一个>=1且<53的数, 下面进行取整:Math.fl 阅读全文
posted @ 2016-10-26 11:02 E山猫 阅读(696) 评论(0) 推荐(0)