简体   繁体   English

HTML5:每当我发送文本区域消息以填写电子邮件的正文时,文本区域的名称都会继续发送。 我该如何解决?

[英]HTML5: Whenever I send a text area message to fill out the body of an email the name of the text area proceeds it. How do I fix this?

Basically whenever I send a text area message to fill out the body of an email, the name of that text area always proceeds it. 基本上,每当我发送文本区域消息以填充电子邮件的正文时,该文本区域的名称都会继续进行处理。 So, for example, if I type in "Hello World" into text area and then press send, my email application opens and the body reads: "message=Hello World". 因此,例如,如果我在文本区域中输入“ Hello World”,然后按发送,则我的电子邮件应用程序将打开,并且正文显示为:“ message = Hello World”。 How do I get rid of the "message=" part? 如何摆脱“ message =“部分? Thank you very much and heres my current HTML5 code: 非常感谢,这里是我目前的HTML5代码:

<section id="contact" class="four">
    <div class="container">

        <header>
            <h2>Contact</h2>
        </header>

        <p>Send me a message: </p>

        <form method="post" action="mailto:abc@abc.net" enctype="text/plain">
            <div class="row">
                <div class="12u$">
                    <textarea name="message" placeholder="Message"></textarea>
                </div>
                <div class="12u$">
                    <input type="submit" value="Send Message" />
                </div>
            </div>
        </form>             
    </div>
</section>

It may not be exactly what you're after but if you change your form method to GET and change the name of textarea to 'body' it will work as you expect without the tags. 可能不完全是您想要的,但是如果将表单方法更改为GET并将textarea的名称更改为“ body”,则无需标签也可以正常工作。 Using the post method encodes the data and mail client's dont know how to had it without the tags. 使用post方法对数据进行编码,邮件客户端的客户不知道如何在没有标签的情况下使用它。 You can read more about it here: https://support.microsoft.com/en-us/kb/279460 您可以在此处了解更多信息: https : //support.microsoft.com/en-us/kb/279460

<section id="contact" class="four">
<div class="container">

    <header>
        <h2>Contact</h2>
    </header>

    <p>Send me a message: </p>

    <form method="GET" action="mailto:abc@abc.net" enctype="text/plain">
        <div class="row">
            <div class="12u$">
                <textarea name="body" placeholder="Message"></textarea>
            </div>
            <div class="12u$">
                <input type="submit" value="Send Message" />
            </div>
        </div>
    </form>             
</div>

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

相关问题 如何在html文本区域的开头添加默认文本? - How do I add a default text to the beginning of an html text area? 如何使 html 文本区域出现 javascript? - How do i make an html text area appear javascript? 如何使用ajax获取文本区域数据(文本区域中的Html文件)我需要将数据发送到Php? Ajax没有发送我的文本区域数据? - How To get Text Area Data (Html File in Text area) using ajax And i need to send data to Php ? Ajax not sending my Text area data? 如何修复 HTML5 画布中的模糊文本? - How do I fix blurry text in my HTML5 canvas? 如何移动 onclik 文本以移动到文本区域? - How do I move the onclik text to move to the text area? 如何防止我的文本区域(专门输入类型的电子邮件)不被填充 - How do I prevent my text area (excually input type email) from not being filled Javascript - 如何将文本区域的值发送到我的文本框 - Javascript - How can I send the value of the text area to my textbox 换行符被打印为html文本区域中的空白。 我该如何解决 - Newline is being printed as a whitespace in Text Area of html. How do I resolve 如何限制粘贴在 contenteditable 区域中的文本样式? - How do I restrict the style of the text pasted in a contenteditable area? 如何将特定文本从一个区域复制到另一个区域? - How do I copy specific text from one area to another?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM