I know only a little bit of JavaScript. I need to output in my terminal a message input by user in a html form, but my current JavaScript solution isn't displaying the right output.
HTML
<h2 class="heading">Send e-mail to someone@example.com:</h2>
<input name="myText" id="myText" type="text" placeholder="enter your message here">
<button id="btn" onclick="sendMail()">Send</button>
<script src="./server.js"></script>
javascript
console.log(document.getElementById('myText').innerText());