Advertisement
dibusure

JS code

Jul 12th, 2021
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let genPassword = (len) => {
  2.     const symbols = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789()_!";
  3.  
  4.     let password = "";
  5.     for (let i = 0; i < len; i++) {
  6.         password += symbols.charAt(Math.floor(Math.random() * symbols.length));
  7.     }
  8.     return password;
  9. }
  10.  
  11. function getValue (id) {
  12.     text = document.getElementById(id).value; //value of the text input
  13.     alert(text);
  14.     return false;
  15. }
  16. document.getElementsByName("limit")[0].value;
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement