1 <script language="JavaScript"><!--
3 /*******************************************************
4 * Random Password Generator JavaScript
5 * <http://www.kipp.smith.net/javascripts/random.htm/>
6 * This script is free as long as original credits remain.
7 ********************************************************/
9 // Use the following variables for password characters
12 var characters="0123456789abcdefghijklmnopqrstuvwxyz"
16 function generatepassword(object, plength) {
17 // This function will build a string using randomly
18 // generated characters.
23 passwordlength=plength
24 while( n < passwordlength ) {
26 randomnumber = Math.floor(characters.length*Math.random());
27 password += characters.substring(randomnumber,randomnumber + 1)
30 // Display the word inside the form text box
32 object.value = password