I'm building my personal website. At the "contact" page, I would like the visitor to send message to me. Once they clicked the button, an e-mail containing the typed information would be sent to my e-mail address. I searched some results implemented by PHP. But I want get some advise on just html or javascript.
My following code can active a email window. But I don't want the visitors to type the information again. I want the email would be sent just after the "submit" button is clicked.
<form method="post" action='mailto:myemail@gmail.com'>
<label for="visitor-name">Name</label>
<input type="text" id="visitor-name" placeholder="Please Enter Your Name">
<label for="visitor-email">E-mail</label>
<input type="text" id="visitor-name" placeholder="Please Enter Your E-mail">
<label for="visitor-message">Message</label>
<textarea id="visitor-message" placeholder="Please Leave your Message"></textarea>
<input type="submit" value="Submit" id="contact-sub" onclick="sendmessage();">
</form>
by the way, the sendmessage() function is empty.