是的,用mailto:http://www.angelfire.com/dc/html-webmaster/mailto.htm查看所有提示和技巧
邮件主题示例:
<a href="mailto:no-one@snai1mai1.com?subject=free chocolate">example</a>
包含内容的邮件收件人:
<a href="mailto:no-one@snai1mai1.com?subject=look at this website&body=Hi,I found this website and thought you might like it http://www.geocities.com/wowhtml/">tell a friend</a>
正如 comments 中提到的,subject
和body
都必须正确转义.在每种情况下使用encodeURIComponent(subject)
,而不是在特定情况下手动编码.
如注释中所述,您可以通过在字符串中添加以下编码序列来添加换行符:
%0D%0A // one line break