[英]Mailto is not loading the subject(or body);
I have been reading a lot of topics and trying for some time now and i can't seem to get my mailto: to fill in my subject and body. 我一直在阅读很多主题,并且已经尝试了一段时间,但我似乎无法收到邮件:填写我的主题和正文。
So it starts the mail-client (i have tried 3 different clients(outlook,windows standard,gmail) and every time it fills in the mail-address but never the subject and body. 因此,它启动了邮件客户端(我尝试了3个不同的客户端(outlook,windows standard,gmail),并且每次填写邮件地址时都不会填写主题和正文。
totalmenu() {
var form = document.getElementById('emailform');
// form.action = "mailto:" + personeel.email + "?subject=result&body="
//+ mail();
form.action = "mailto:blabla@gmail.com?Subject=result;
}
The comment shows the actual mailto i wanted to use. 注释显示了我想使用的实际mailto。 I made a new mailto with only a subject to check if it was object related but this is not working as well.
我创建了一个新的mailto,仅包含一个主题,以检查它是否与对象相关,但是效果不佳。 any of u guys had similar problems or maybe see what i'm doing wrong here?
你们有类似的问题吗?或者也许我在这里看错了吗?
I build my own little test code, and probably found what the problem is. 我建立了自己的小测试代码,可能发现了问题所在。 This code seems to work:
这段代码似乎有效:
<html>
<body>
<form id="emailform" method="POST">
<input type="text" value="this is a test">
<input type="submit" value="send email">
</form>
<script>
(function() {
var form = document.getElementById('emailform');
form.action = "mailto:blabla@example.com?Subject=result";
})();
</script>
</body>
</html>
But if I change the form method from "POST"
to "GET"
it doesn't work anymore. 但是,如果我将表单方法从
"POST"
更改为"GET"
它将不再起作用。
Are you using "GET"
? 您在使用
"GET"
吗?
I tested the code with Firefox and Chrome on Windows 10. 我在Windows 10上使用Firefox和Chrome测试了代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.