随机数的方法
值 = Math.floor(Math.random() * 可能值的總數(shù) + 第一個可能的值)
例:產生1-10的隨機數(shù)
var rand=Math.floor(Math.random*10+1)
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎勵來咯,堅持創(chuàng)作打卡瓜分現(xiàn)金大獎總結
- 上一篇: 刷新页面 数组轮播
- 下一篇: Shell 命令大全Xhell入门