function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
var num = getRandomInt(5, 8)
function getrRandomStr(len) {
var text = " ";
var charset = "abcdefghijklmnopqrstuvwxyz";
for (var i = 0; i < len; i++)
text += charset.charAt(Math.floor(Math.random() * charset.length));
return text;
}
getrRandomStr(num);
标签:none