Hey, can someone help me out with this please? I’m sure there’s a very simple solution but I just can’t figure it out. Here’s my code:
var inputValue = document.getElementById("text-box").value;
document.getElementById("chat-output").innerHTML += inputValue;
var button = document.getElementById("submit-button");
button.onclick = appendMessage;
It’s supposed to render whatever is entered in the input text box to a div when the submit button is clicked. It works but only once. When I try to do it the second time, nothing happens. Any help/input would be appreciated. If additional info is needed, please let me know as I’m brand new to this site haha.