Math.random(); // 生成0~1之间的随机数
Math.random()*10 + 1; // 1~10的随机数
num = Math.random() * 100 + new Date() //随机加上当前date
js Math生成随机数
最新推荐文章于 2023-06-25 23:48:31 发布
Math.random(); // 生成0~1之间的随机数
Math.random()*10 + 1; // 1~10的随机数
num = Math.random() * 100 + new Date() //随机加上当前date