1.生成指定范围随机数 function randNum(minnum , maxnum){ return Math.floor(minnum + Math.random() * (maxnum - minnum)); }