HTML网络表单mailto不工作的问题 [英] HTML web form mailto not working issue

查看:178
本文介绍了HTML网络表单mailto不工作的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要帮助,我是HTML5的新手。我构建了一个HTML5 Web表单并尝试使用mailto函数发送出去。但是当我尝试在我的Android设备上使用Chrome浏览器时,它会显示:

I need help, I am new to HTML5. I build a HTML5 web form and try to use mailto function to send out. But when I try to do it on my android device with chrome browser, it shows:


网页不可用

任何人都可以提供帮助吗?

Anyone can help ?

<form method="post" action="mailto:myname@gmail.com" enctype="text/plain">       
  <p>
    <label for ="firstname" class="text">First Name:</label>
    <input type="text" name="firstname" id="firstname" />
  </p>      
  <p>
    <label for ="lastname">Last Name:</label>
    <input type="text" name="lastname" id="lastname" />
  </p>    
  <p>
    <label for ="hkid">HK Identity Card:</label>
    <input type="date" name="dob" id="dob" />
  </p>
  <p>
    <label for="sex" class="select">Sex:</label>
    <select name="sex" id="sex" data-native-menu="false">
      <option value="option1">Male</option>
      <option value="option2">Female</option>
    </select>
  </p>                                
  <p>
    <label for="mobile"> Mobile:</label>
    <input type="tel" name="mobile" id="mobile" />
  </p> 
  <p>
    <label for="hometel">Resident Phone:</label>
    <input type="tel" name="hometel" id="hometel" />
  </p>
  <p>
    <label for="email">Email Address:</label>
    <input type="email" name="email" id="email" />
  </p>     
  <p>
    <label for ="date">Appointment Date(DD-MM-YYYY)</label>
    <input type="date" name="date" id="date" value="" />
  </p>         
  <p>
    <label for="session" class="select">Session :</label>
    <select name="session" id="session" data-native-menu="false">
      <option value="option1">AM</option>
      <option value="option2">PM</option>
    </select>
  </p>  

  <input type="submit" value="Send" />
  <input type="reset" value="Reset" />      
</form>


推荐答案

mailto:因为表单操作不太受支持

mailto: as a form action simply is not well supported.

使用HTTP(S)表单操作并从您的服务器而不是用户(可能不存在的)电子邮件客户端发送电子邮件。

Use an HTTP(S) form action and send the email from your server instead of the user's (possibly non-existent) email client.

这篇关于HTML网络表单mailto不工作的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆