You're on the right track with using document.getElementById()
as you have done for your first two text boxes. Use something like document.getElementById("textbox3")
to retrieve the element. Then you can just set its value property: document.getElementById("textbox3").value = answer;
For the "Your answer is: --", I'd recommend wrapping the "--" in a <span/>
(e.g. <span id="answerDisplay">--</span>
). Then use document.getElementById("answerDisplay").textContent = answer;
to display it.