如何生成随机数和概率 2017-09-27 本文已影响43人 痛心凉 思路:利用Math方法做随机数和概率 首先产生0-1之间的数,就是我们常说的概率 Math.random() 生成随机数的公式 Math.random()*(max -min)+min