Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用带有多个段落和 URL 的 mailto: 正文。我可能应该注意到这是针对移动 Web 应用程序的。
有没有理由我不能使用 \n (即使在 JavaScript 字符串中)换行?相反,我使用的是 %0D%0A。
我想将我的 URL 包含在 <> 中,以便电子邮件客户端可以正确地将其识别为 URL,但是当我尝试这样做时,整个 URL 根本不会出现在正文中。是逃跑了还是怎么了?我该如何解决这个问题/使用 <> 来包装它?
谢谢!
您是否尝试过使用 javascript 对值进行编码?
例如
<a href="demo@email.com?subject='+encodeURI('emailSubject')+'&body='+encodeURI('emailBody')+'">