提交按钮不发布电子邮件

时间:2018-03-30 21:08:07

标签: html forms

我制作了一个简单的表格来满足我网站的需求。这是想要的,但是,我无法使用“mailto”功能将用户提供的信息发送到我的电子邮箱。

按下“发送”按钮后,不执行任何操作。有人可以帮助我吗?

注意:表单只是HTML,没有数据库使用,它只是一个电子邮件桥。

<div class ="Formulario">
  <div align="center">
        <form id="form1" name="formulario" method="post" action="mailto:helpcelere@gmail.com">
    <table width="200" height="250" border="0" cellspacing="0" cellpadding="0">
    <tbody>
        <tr>
    <td><input name="txt_nome" type="text" form="form1" placeholder="Nome" /></td>
        </tr>
        <tr>
    <td><input name="txt_titulo" type="text" id="txt_titulo" form="form1" placeholder="Título do problema" titulo="txt_titulo" /></td>
        </tr>
        <tr>
    <td><input name="txt_email" type="text" id="txt_email" form="form1" placeholder="Seu e-mail" email="txt_email" /></td>
        </tr>
        <tr>
    <td><textarea cols="50" rows="8" form="form1" placeholder="Mensagem"></textarea></td>
        </tr>
        <tr>
    <td><input type="submit" form="form1" formaction="mailto:helpcelere@gmail.com" formmethod="POST" value="enviar" /></td>
        </tr>

        </tbody>
    </table>

        </form>
    </div>
    </div>

1 个答案:

答案 0 :(得分:-1)

试试这个

<div class ="Formulario">
  <div align="center">
        <form id="form1" name="formulario" method="post" action="mailto:helpcelere@gmail.com">
    <table width="200" height="250" border="0" cellspacing="0" cellpadding="0">
    <tbody>
        <tr>
    <td><input name="txt_nome" type="text" form="form1" placeholder="Nome" /></td>
        </tr>
        <tr>
    <td><input name="txt_titulo" type="text" id="txt_titulo" form="form1" placeholder="Título do problema" titulo="txt_titulo" /></td>
        </tr>
        <tr>
    <td><input name="txt_email" type="text" id="txt_email" form="form1" placeholder="Seu e-mail" email="txt_email" /></td>
        </tr>
        <tr>
    <td><textarea cols="50" rows="8" form="form1" placeholder="Mensagem"></textarea></td>
        </tr>
        <tr>
    <td><input type="submit"  value="enviar" /></td>
        </tr>

        </tbody>
    </table>

        </form>
    </div>
    </div>