Math,random()返回区间内的随机数
公式:值 = Math.floor((Math.random() * 总数 + 开始值)); //随机1-10随机数写成函数: function select(start,end){ var total = end - start + 1; return Math.floor(Math.random() * total + start); }for (var i ...