Html 我如何编码我的提交按钮转到电子邮件地址
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18239513/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I code my submit button go to an email address
提问by pb33
my send an email button isn't working "Here's my html. Does anyone see a problem?
我的发送电子邮件按钮不起作用“这是我的 html。有人看到问题吗?
<input type="submit" value="SUBMIT EMAIL TO: [email protected]" <a href="mailto:[email protected]">
回答by Yotam
You might use Form
tag with action attribute to submit the mailto
.
您可以使用Form
带有 action 属性的标签来提交mailto
.
Here is an example:
下面是一个例子:
<form method="post" action="mailto:[email protected]" >
<input type="submit" value="Send Email" />
</form>
回答by Matthew R.
There are several ways to do an email from HTML. Typically you see people doing a mailto like so:
有几种方法可以从 HTML 发送电子邮件。通常你会看到人们像这样发送邮件:
<a href="mailto:[email protected]">Click to email</a>
But if you are doing it from a button you may want to look into a javascript solution.
但是,如果您是通过按钮执行此操作,则可能需要查看 javascript 解决方案。