【问题标题】:How to make a html form email results如何制作 html 表单电子邮件结果
【发布时间】:2018-12-19 05:51:16
【问题描述】:

我制作了一个 html 表单并希望它通过电子邮件将结果发送给我,以便我可以评估答案,然后将其添加到我的网站。我希望电子邮件看起来像这样:

姓名:姓名

电子邮件:电子邮件

标题:标题

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>

【问题讨论】:

标签: html


【解决方案1】:

如果您不想使用 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">

【讨论】:

  • 我无法让它工作。对不起,如果我的错误是愚蠢的。我是编程新手。新程序:
    formspree.io/myemal@icloud.com" method="POST">
    正文>
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-03-30
  • 1970-01-01
  • 2014-06-07
  • 2017-07-16
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多