Javascript表单提交除正文部分以外的所有信息。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+
'[email protected]&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
任何帮助,将不胜感激。提前致谢。 :)
一切正常,期待身体的一部分。提交表格时,身体内没有任何反应。 –
也许它是你的URL中的未编码空白(尝试用“%20”替换“”)?你在不同的浏览器中试过了吗? – JDB
嘿,只是用IE浏览器进行了测试,发现它在那里效果不错,但它在Chrome中无法使用。很奇怪。 –