您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

我可以使用mailto:设置电子邮件的主题/内容吗?

我可以使用mailto:设置电子邮件的主题/内容吗?

mailto主题示例:

<a href="mailto:no-one@snai1mai1.com?subject=free chocolate">example</a>

mailto内容

<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>

正如评论中提到的那样subjectbody必须适当地对和进行转义。encodeURIComponent(subject)在每种情况下使用,而不是为特定情况手工编码。

可以通过在字符串中添加以下编码序列来添加换行符:

%0D%0A // one line break
其他 2022/1/1 18:16:51 有513人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶