Home Article js生成4位数字验证码

js生成4位数字验证码

Release time:2020-09-27 12:14:40 Author:admin Reading volume:2787
var num = '';
for (var i = 0; i < 4; i++) {
            if(i == 0){
		num += Math.floor(Math.random() * 9 + 1);
	    }else{
		num += Math.floor(Math.random() * 10);
	     }
}
return Number(num);
  
I want to comment
Leave a message
http://www.151600.com/index.php/
User login
You have not written any reviews yet!
You have commented!
Can only praise once!
You have a collection!