舉2個例子,我們需要取得1 ~ 10 的隨機整數: var randomNum = Math.floor(Math.random() * 10 + 1 );. console.log(randomNum); //介於1和10之間的隨機 ...
確定! 回上一頁