繁体   English   中英

JavaScript表单未将任何内容发布到正文中

[英]Javascript Form not posting anything into the body

Javascript表单提交所有信息,但正文部分除外。

<form action="javascript:;" method="post" enctype="text/plain"  onSubmit="this.action='mailto:'
                      +document.getElementById('friend1').value+','
                      +document.getElementById('friend2').value+','
                      +document.getElementById('friend3').value+
                      '?cc=test@test.com&subject=Tester and space&body=testit';">

<input type="Email" id="friend1" value="" required placeholder="1st friend's email"/><br>
<input type="Email" id="friend2" value="" required placeholder="2nd friend's email"/><br>
<input type="Email" id="friend3" value="" required placeholder="3rd friend's email"/><br>

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

假定以以下形式更改位于“ onSubmit”操作中的正文内容的部分:

&body=testit

任何帮助,将不胜感激。 提前致谢。 :)

用%20替换主题中的空格。 我记得几年前有一个问题。 它与编码有关。

&subject=Tester%20and%20space

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM