我制作了HTML表格,并希望它将结果发送给我,以便我可以评估答案,然后将其添加到我的网站中。我希望电子邮件看起来像这样:
名称:名称
电子邮件:电子邮件
标题: title
Messige: Massige
当前程序:
<!DOCTYPE html>
<html>
</body>
<form>
name<br>
<input type="text" name="name" id="user_input"><br>
email<br>
<input type="email" name="email" id="user_input"><br>
title<br>
<input type="text" name="title" id="user_input"><br>
message<br>
<textarea id="msg" name="user_message"></textarea>
</form>
<div class="button">
<button type="submit">submit</button>
</div>
</body>
</html>
如果您不想使用php/node.js/另一种技术,则可以使用formspree api。您的HTML看起来像这样:
<form action="https://formspree.io/your@email.com" method="POST">
<input type="text" name="name">
<input type="email" name="_replyto">
<input type="submit" value="Send">
</form>
您在此处注册一个帐户:https://formspree.io/。您将在收件箱中收到表格提交。
另一种选择是添加" mailto"链接而不是完整的联系表。这会创建一个链接,该链接打开用户的默认电子邮件系统(即Gmail/Outlook/Mail),并让他们从收件箱中给您发送电子邮件。"%0d%0A%0D%0A"部分在电子邮件中创建了一条新行:
<a href="mailto:YOUREMAIL@gmail.com?subject=Hello&body=Hello Owen,%0D%0A%0D%0AI'm interested in xyz thing on your website%0D%0A%0D%0A" target="_blank">