📌  相关文章
📜  用于生成随机字母数字字符串的 javascript 函数 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:15.028000             🧑  作者: Mango

代码示例2
var characters = 'abcdefghijklmnopqrstuvwxyz0123456789';
var result = ""
var charactersLength = characters.length;

for ( var i = 0; i < 5 ; i++ ) {
    result += characters.charAt(Math.floor(Math.random() * charactersLength));
}

console.log(result)