random方法获取随机数

使用random()方法生成随机数,固定样式:

function(min,max){

  公式:值= Math.random()*可能的值+第一个值

   Math.random()*(max-min)+min

}

原文地址:https://www.cnblogs.com/lljun/p/12341728.html