Html5发送电子邮件表格

时间:2015-11-07 13:23:28

标签: html html5 email

我有一个网站,但我无法提供发送电子邮件表单模板。

<div class="col-md-6 contact-top-right">
    <div class="contact-textarea">
        <form>
            <input type="text" value="First Name" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'First Name';}"/>
            <input type="text" value="Second Name" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Second Name';}"/>
            <input type="text" value="Email Id" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Email Id';}"/>
            <textarea value="Message:" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Message';}">Message..</textarea>
            <input type="submit" value="SUBMIT" >
            <input type="reset" value="CLEAR" >
        </form>
    </div>
</div>

我在哪里放电子邮件地址?

1 个答案:

答案 0 :(得分:0)

mailto 标记中使用 form's action ,如下所示:

<div class="col-md-6 contact-top-right">
  <div class="contact-textarea">
      <form method="GET" action="mailto:test@example.com" enctype="text/plain">
         <input type="text" value="First Name" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'First Name';}"/>
         <input type="text" value="Second Name" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Second Name';}"/>
         <input type="text" value="Email Id" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Email Id';}"/>
         <textarea value="Message:" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Message';}">Message..</textarea>
         <input type="submit" value="SUBMIT" >
         <input type="reset" value="CLEAR" >
       </form>
   </div>
</div>