设置与包含&符号(&)的主题的mailto链接 [英] Set a mailto link with a subject containing an ampersand (&)
本文介绍了设置与包含&符号(&)的主题的mailto链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用下面的 mailto
链接发送一封电子邮件:
< a class =share3title =href =mailto:?subject = @ check& amp; body = @ domain>
效果很好,但有时候我的主题会包含&符号(&)字符,我的电子邮件是在没有正文的情况下创建的。
解决此问题的方法是什么? / div>
为了将特殊/保留字符转换为URL,您必须对它们进行编码 - 要使&
起作用,它必须编码为%26
。
更多详情:http://www.w3schools.com/tags/ref_urlencode.asp
Im using the following mailto
link to send an email:
<a class="share3" title="" href="mailto:?subject=@check&body=@domain">
It works well, but sometimes my subject will contain an ampersand (&) character, and when it does my email is created without a body.
Any way to resolve this problem?
解决方案
In order to get special/reserved characters into a URL, you must encode them - to get an &
to work, it must be encoded to %26
.
More details here: http://www.w3schools.com/tags/ref_urlencode.asp
这篇关于设置与包含&符号(&)的主题的mailto链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文