Math.random(); // 生成0~1之间的随机数
Math.random()*10 + 1; // 1~10的随机数
num = Math.random() * 100 + new Date() //随机加上当前date
js Math生成随机数
最新推荐文章于 2025-03-29 18:11:38 发布
Math.random(); // 生成0~1之间的随机数
Math.random()*10 + 1; // 1~10的随机数
num = Math.random() * 100 + new Date() //随机加上当前date