JS 生成随机数

var generateRandomAlphaNum = function (len) {
var rdmString = "";
for (; rdmString.length < len; rdmString += Math.random().toString(36).substr(2));
return rdmString.substr(0, len);
}

posted @ 2020-03-15 23:39  Ever-Lose  阅读(161)  评论(0编辑  收藏  举报