function selectRendom(startNum,endNum){ var choose = endNum - startNum +1; return Math.floor(Math.random()*choose+startNum) }; alert(selectRendom(2,3));
function selectRendom(startNum,endNum){ var choose = endNum - startNum +1; return Math.floor(Math.random()*choose+startNum) }; alert(selectRendom(2,3));
转载于:https://www.cnblogs.com/zfdai/p/3638098.html