js生成邀请码(2)

//生成邀请码方法一
	/*function createInviteCode() {
	    var s = [],a=6,b=10;
	    var chars = "123456789QWERTYUIPASDFGHJKZXCVBNM";
	    for (var i = 0; i < a; i++) {
	        s[i] = chars.substr(Math.floor(Math.random() * 0xb), 1);
	    }    
	   var uuid = s.join("");
	    document.getElementById("ic").value=uuid;
	}*/

  

原文地址:https://www.cnblogs.com/ipetergo/p/6689742.html