Javascript Generate Random Strong Password in HTML/CSS

random-password-generator-javascript

Password Generator is an online application to generate random strong passwords with just one click. Written in HTML CSS and JavaScript. Without third-party libraries.

random password generator with prompts javascript, random password generator javascript github, password generator javascript using confirm and prompt, javascript generate random strong password

How to make use of it:

1. Create an input file to place the generated password strings.

<input type="text">

2. Create a button to generate a powerful password.

<button>Generate Password</button>

3. Create Copy buttons contained in the password subject. Requires Font Awesome Iconic Font in this instance.

<span class="far fa-copy" onclick="copy()"></span>
<span class="fas fa-copy" onclick="copy()"></span>

4. The most important script to allow the password generator.

const display = document.querySelector("input"),
      button = document.querySelector("button"),
      copyBtn = document.querySelector("span.far"),
      copyActive = document.querySelector("span.fas");
let chars = "[email protected]#$%^&*()_+~`|}{[]:;?><,./-=";
button.onclick = ()=>{
  let i,
  randomPassword = "";
  copyBtn.style.display = "block";
  copyActive.style.display = "none";
  for (i = 0; i < 16; i++) {
    randomPassword = randomPassword + chars.charAt(
      Math.floor(Math.random() * chars.length)
    );
  }
  display.value = randomPassword;
}
function copy(){
  copyBtn.style.display = "none";
  copyActive.style.display = "block";
  display.select();
  document.execCommand("copy");
}

Random Password Generator Plugin/Github, javascript challenge password generator, random password generator github, password generator javascript source code


See Demo And Download

Official Website(Riya-Panhotra): Click Here

This superior jQuery/javascript plugin is developed by Riya-Panhotra. For extra Advanced Usages, please go to the official website.