I\'m having some trouble whenever I want to add some text to my div tag, here\'s my code:
What's happening is your form is submitting, the page is refreshing, and the div is going back to its pre-JavaScript-set content.
Try swapping the type='submit' to 'button' on the button.