js数组中随机取值 数组中随机取值 let aa=[1,2,3,4,5,6,7,8]; let result= Math.floor(Math.random() * aa.length); console.log(result)1到100随机数获取 let result=Math.floor((Math.random()*100)+1) console.log(re... JavaScript 2023-12-11 112 点赞 1 评论 169 浏览