日日摸夜夜添夜夜添aa,亚洲一区二区在线视频,国产精品入口在线看麻豆,久久久久久久99精品免费观看

隨機(jī)生成數(shù)字,random()方法得使用

程序猿 2021-03-13 16:35:00 1987瀏覽 加載中

返回介于0(包含)~1(包含)之間的一個(gè)隨機(jī)數(shù)

Math.random()

返回介于1(包含)~10(包含)之間的一個(gè)隨機(jī)數(shù)

Math.floor((Math.random()*10)+1);

返回介于min(包含)~max(包含)之間的一個(gè)隨機(jī)數(shù)

function getRndInteger(min, max) {
  return Math.floor(Math.random() * (max - min) ) + min;}


標(biāo)簽:
最后修改:2025-07-01 06:46:38

非特殊說明,本博所有文章均為博主原創(chuàng)。