1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
function createString(count){ var text = ""; var string_tmp = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123546789"; for(var i = 0; i < count; i++){ text += string_tmp.charAt(Math.floor(Math.random() * (string_tmp.length+1))); } return text; }
for (var x = 0; x < 10; x++){ console.log(createString(11)); }
var y = 1; for (var i = 0; i < 11; i++){ y = y*62; } console.log("11位字符串的数量: " + y)
|