-1

I made a simple guess the letter game. I want to display the letters guessed in the html after I type them. What can I use to do that?

2
  • try put some example. Commented Aug 17, 2017 at 3:08
  • Can you detect key press events? Can you update HTML on the page? Where are you stuck? Commented Aug 17, 2017 at 3:12

1 Answer 1

0

Many ways to do this; perhaps quickest and easiest is with jQuery.

  1. Include Jquery in your page
  2. Make a div element and give it an ID.

  3. After a letter is guessed/typed, use .appendTo(), .html(), .val(), or the like to add the guess to the list

How to add text to an existing div with jquery

https://developers.google.com/speed/libraries/

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you! That helped out a lot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.