Entering answers in a text box

How can you enter an answer in a text box? I’m wondering because I’m making a math game for a site and it would be confusing clicking buttons to add to your answer. An example would be (so it’s clearer):
1000
+1000


2000

1000+1000 is the problem and your answer (2000) is typed in a box. Can anyone help?