Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

rate a strong password Number of characters: Password:

Develop a password generator

  1. Open the HTML and JavaScript files in this folder:

exercises_extrach08password

  1. In the JavaScript file, note that five functions are supplied. The $ function. The getRandomNumber function. The start of a generatePassword function. A clearFields function that resets the text boxes and moves the focus to the first text box. And an onload event handler that attaches the generatePassword and clearFields functions to the click events of the related buttons.
  2. In the generatePassword function, get the value entered by the user and make sure it’s a number. If it isn’t, display an alert box with this message: “Please enter a valid number”.
  3. If the number entered by the user is valid, code a for loop that iterates that number of times. In each iteration of the loop, randomly select one of the characters from the chars variable and concatenate it to the password variable.
  4. When the loop is finished, display the password in the password textbox.
NEED to use provided files
  • Attachment 1
  • Attachment 2
  • Attachment 3
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question