I want to post the value of a text box into a text area when I click on a button.

HTML Code:
  <script>
            
            var newMessage = document.messageForm.User_message.value;
            
            var textBox = document.messageForm.chat_box.value;
            
            function printMessage () {
                
                document.messageForm.textBox.value = document.messageForm.User_message.value;
                
                
            }
            
        </script>