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.
我正在尝试创建一个 HTML 电子邮件链接,并且在正文中我试图开始一个新行,但我不知道该怎么做。这是我的代码:
<a href="mailto:youremail.yahoo.com?subject=Email &body=This is an email. This is a new paragraph.">Click to send email</a>
我希望电子邮件正文在“这是一封电子邮件”之间开始新的一行。和“这是一个新段落”。我该怎么做呢?
您需要使用回车 (%0D) 和换行 (%0A) 的十六进制表示
不能保证您的用户会将 HTML 设置为电子邮件应用程序中的默认样式。
<a href="mailto:youremail.yahoo.com?subject=Email &body=This is an email.%0D%0AThis is a new paragraph.">Click to send email</a>