I want to make it so that if a user on the html page presses the letters A, H, then A, an alert box comes up saying “Aha, you’ve found the secret!”
How do I accomplish this with Jquery, Javascript, etc?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are more efficient ways to do this, but I figured this is the best way to demonstrate to you the core principles at work. This is using key down event handlers, and the jQuery framework.
Addendum : It’s worth noting that the integer 65 represents a keyboard press of the letter
aand 72 a keyboard press of the letterh