js随机数

随机数

得到[a,b]区间的整数,公式:

  • parseInt(Math.random()*(b-a+1))+a
posted @ 2022-01-06 13:39  zongkm  阅读(44)  评论(0)    收藏  举报