Created
January 6, 2014 07:58
-
-
Save silianlinyi/8279646 to your computer and use it in GitHub Desktop.
生成一组随机的字母数字字符
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateRandomAlphaNum(len) { | |
var rdmString = ""; | |
for( ; rdmString.length < len; rdmString += Math.random().toString(36).substr(2)); | |
return rdmString.substr(0, len); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment