Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Open the HTML and JavaScript files in this folder: exercises_extrach08password 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. 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”. 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. When the loop is finished, display the password in the password textbox. NEED to use provided files

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

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"