First off, this is just a quick fix so you can get what you want up and running quick enough. Look up how API's work and fetch/axios calls in javascript so you can do this stuff easily later on. With that said, a few things I'm assuming you already have are:
-
An input field for the user of the type
<input id='input-id'>...</input>
-
A button to post the message