Created
February 8, 2016 13:33
-
-
Save yokesharun/4be5915e6d204d0044ec to your computer and use it in GitHub Desktop.
Generate random Characters with Jquery
This file contains hidden or 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 makeid() | |
{ | |
var text = ""; | |
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; | |
for( var i=0; i < 5; i++ ) | |
text += possible.charAt(Math.floor(Math.random() * possible.length)); | |
return text; | |
} | |
// call the function like makeid(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment