首先我們需要用到JS本身的 Math.random() 函式,這個函數會隨機產生出0~1之間的 ... Math.floor(Math.random()*2); //回傳0或1 Math.floor(Math.random()*3); //回傳0 ...
確定! 回上一頁