gpt4 book ai didi

html - 从 HTML 表单转换为 '+' 的空格

转载 作者:搜寻专家 更新时间:2023-10-31 08:11:01 24 4
gpt4 key购买 nike

所以我一直在研究 HTML 表单,我对你们这一切都是陌生的,所以任何帮助都会大有帮助!但无论如何...这是我的电子邮件表单编码。

enter image description here enter image description here

因此,当我提交填写了正确区域的表单时,它会打开在 Outlook(2010 如果重要的话)中,它会转换电子邮件的正文变成“+”(加号)...任何人都可以给我一些想法吗?此 HTML 将在我们网络中的离线站点上使用,不会去现场。所有计算机都在域中并且可以访问此桌面上的 HTML 链接。

最佳答案

您应该设置 enctype <form> 的属性标记到文本。

<form enctype="text/plain" ...

更多详情请参见 this KB

In both cases, the FORM data is e-mailed in as an Attachment, in an encoded format. For instance, in the preceding case, this is how the data looks:

Subject=Test+Subject&Body=%09kfdskfdksfkds%0D%0A%09

This is because the default ENCTYPE attribute for the FORM element is "application/x-www-form-urlencoded". To e-mail data in > plain-text format instead, explicitly specify an ENCTYPE attribute of "text/plain". For instance:

<FORM Action="mailto:xyz" METHOD="POST" ENCTYPE="text/plain">
mailto: protocol test:
<Br>Subject:
<INPUT name="Subject" value="Test Subject">
<Br>Body:&#xa0;
<TEXTAREA name="Body">
kfdskfdksfkds
</TEXTAREA>
<BR>
<INPUT type="submit" value="Submit">
</FORM>

produces the following Body:

Subject=Test Subject
Body= kfdskfdksfkds

关于html - 从 HTML 表单转换为 '+' 的空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20857390/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com