function rand(max, min){ return Math.floor(Math.random()*(max-min+1)+min) } 转载于:https://www.cnblogs.com/-CLAY-/p/random2.html