获取自定义范围的随机整数
2017-02-23 本文已影响4人
u14e
function selectForm(first, second) {
var choices = second - first + 1;
return Math.floor(Math.random() * choices + first);
}
function selectForm(first, second) {
var choices = second - first + 1;
return Math.floor(Math.random() * choices + first);
}