js 生成[x,y]的随机数 2019-07-05 本文已影响2人 月之风伤 function unitfrom(x,y){ return parseInt(Math.random()*(y+1-x)+x); }