//最大值 5 最小值 1var fround = LimitRandom(1,5)alert(fround); function LimitRandom(min,max){ var fRound = Math.floor(Math.random()*(max-min+1)+min); return fRound; }
js取俩个数之间的随机数
原文:https://www.cnblogs.com/studyh5/p/11495831.html