added javascript snippet for password generation

This commit is contained in:
Bjoern Biesenbach 2015-01-08 15:54:46 +01:00
parent 6cca28afca
commit 057997970d

View file

@ -3,6 +3,17 @@
<head>
<title>WebMUM</title>
<link rel=stylesheet href="<?php echo FRONTEND_BASE_PATH; ?>include/css/style.css" type="text/css" media=screen>
<script type="text/javascript">
function generatePassword() {
var length = 9,
charset = "abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!#",
retVal = "";
for (var i = 0, n = charset.length; i < length; ++i) {
retVal += charset.charAt(Math.floor(Math.random() * n));
}
return retVal;
}
</script>
</head>
<body>
@ -14,4 +25,4 @@
</div>
</div>
<div id="content"> <!-- Opening content -->
<div id="content"> <!-- Opening content -->