无法在mailto链接中使多行正常工作
就我而言,我正在使用Outlook默认邮件阅读器对其进行测试。
以下内容放置在 anchor href中:mailto:email@address.com?&subject=test&body=type%20your&body=message%20here
电子邮件正文中仅显示“此处的消息”。 (无论我使用Chrome还是IE)
有什么想法吗?
最佳答案
您可以使用URL encoding将换行符编码为%0A
。mailto:email@address.com?subject=test&body=type%20your%0Amessage%20here
尽管上述方法在许多情况下似乎可行,但用户olibre points out认为,管理mailto URI方案的RFC指定应使用%0D%0A
(回车+换行)代替%0A
(换行)。另请参阅:Newline Representations。
关于html - mailto链接多条 body 线,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10356329/