JS 随机整数
var ran = Math.floor(Math.random() * 10 + 1); // 1到十的随机整数
var ran = Math.floor(Math.random() * 10); // 0到十的随机整数
文章标签 Math 文章分类 JavaScript 前端开发
var ran = Math.floor(Math.random() * 10 + 1); // 1到十的随机整数
var ran = Math.floor(Math.random() * 10); // 0到十的随机整数
javascript获取整数随机数
Math.round(Math.random()*1000+1) ;//取得1-1000的随即数
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M