发布于 4年前

js 生成随机长度数字验证码

// 六位随机数字
Math.floor(Math.random() * (999999 - 100000)) + 100000
// 五位随机数字
Math.floor(Math.random() * (9999 - 1000)) + 1000
©2020 edoou.com   京ICP备16001874号-3