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中無法使用。很奇怪。 –