案例 随机数案例
随机0-1数(包含小数)
document.write(Math.random())
随机5-10 (含小数)
document.write(Math.random()*5+10)
随机1-3的整数 (Math.round()取整的意思)
document.write(Math.round(Math.random()*2+1)+'<br/>')
* 随机3-9的整数 6+3 就是 * (max—min)+min
document.write(Math.round(Math.random()*6+3)+'<br/>')
随机获取20-100的整数
document.write(Math.round(Math.random()*80+20))