Skip to content

Instantly share code, notes, and snippets.

@adammiribyan
Created November 26, 2010 18:51
Show Gist options
  • Save adammiribyan/717084 to your computer and use it in GitHub Desktop.
Save adammiribyan/717084 to your computer and use it in GitHub Desktop.
simple password generator using jQuery
$('.hint').click(function(){
var pass = "";
for (var i = 0; i < 6; i++){
pass += parseInt(Math.random() * 16).toString(16);
if ( i == 7 || i == 11 || i == 15 || i == 19 ) pass += "-";
}
$('.registration-editorpassword input').val(pass);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment