Login
Connect via Facebook

Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Forum Threads
Users Online
Guests Online: 2

Members Online: 0

Total Members: 619
Newest Member: Pranav Adithya
Advertising
Donate
If you like our free products please donate us.

Advertising
View Thread
 Print Thread
Cut & Paste Random Password Generator
Admin
Having a difficult time thinking up a password? Need to automatically generate a password as part of a larger application? This script can help! It randomly creates a password of any specified length using alphabetic and numeric input.

Download source  GeSHi: Javascript
  1. <script>
  2.  
  3. //Random password generator- by javascriptkit.com
  4. //Visit JavaScript Kit (http://javascriptkit.com) for script
  5. //Credit must stay intact for use
  6.  
  7. var keylist="abcdefghijklmnopqrstuvwxyz123456789"
  8. var temp=''
  9.  
  10. function generatepass(plength){
  11. temp=''
  12. for (i=0;i<plength;i++)
  13. temp+=keylist.charAt(Math.floor(Math.random()*keylist.length))
  14. return temp
  15. }
  16.  
  17. function populateform(enterlength){
  18. document.pgenerate.output.value=generatepass(enterlength)
  19. }
  20. </script>
  21.  
  22. <form name="pgenerate">
  23. <input type="text" size=18 name="output">
  24. <input type="button" value="Generate Password" onClick="populateform(this.form.thelength.value)"><br />
  25. <b>Password Length:</b> <input type="text" name="thelength" size=3 value="7">
  26. </form>
  27.  
  28. <p align="center">This free script provided by<br />
  29. <a href="http://javascriptkit.com">JavaScript
  30. Kit</a></p>
Parsed in 0.017 seconds, using GeSHi 1.0.8.10
 
Jump to Forum: