write the algorithm and program to a method for validating the username and password. The algorithm is capable of the following: (HTML, CSS, and JavaScript.) The user has three chances; if the username and password match, the user is logged in; otherwise, the user's display account is locked. Assume that a list of usernames and their associated passwords exists. Each time a user enters an incorrect credential, the system should indicate what went wrong (i.e. User does not exist, or Incorrect password) Username: john, Password: smith Username: mary, Password: woods Username: steve, Password: jobs The program should be able to count the number of login attempts. If it reaches the maximum threshold of 3 incorrect credentials, it should disable the login button. If the user was able to log in with correct credentials(username and its corresponding password), use an alert to display ”successfully logged in!”. The program should be able to determine what goes wrong, for example, the ”user does not exist” only appears when the username does not match to the accounts inside the JSON, and ”Incorrect password” if the username is correct but the password for that username is incorrect.
write the
The user has three chances; if the username and password match, the user is logged in; otherwise, the user's display account is locked.
Assume that a list of usernames and their associated passwords exists. Each time a user enters an incorrect credential, the system should indicate what went wrong (i.e. User does not exist, or Incorrect password)
Username: john, Password: smith
Username: mary, Password: woods
Username: steve, Password: jobs
The program should be able to count the number of login attempts. If it reaches the maximum
threshold of 3 incorrect credentials, it should disable the login button. If the user was able to
log in with correct credentials(username and its corresponding password), use an alert to display
”successfully logged in!”.
The program should be able to determine what goes wrong, for example, the ”user does not exist” only appears when the username does not
match to the accounts inside the JSON, and ”Incorrect password” if the username is correct but the password for that username is incorrect.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images