Html Mailto标签详细使用方法
2017-05-06 14:32
393 查看
Html Mailto标签详细使用方法
Html中mailto标签是一个非常实用的贴近用户体验的标签,大多情况下人们都在这样使用<a href="mailto:example@phplamp.com">example@phplamp.com</a>
这样,当我们点击了example@phplamp.com链接后浏览器会为我们自动选择本地的默认邮件软件,并将mailto标签后example@phplamp.com邮件地址放到邮件软件的发送地址中,少去了我们发送邮件时输入发送地址的烦扰,同时也可以避免输错邮件地址。
其实mailto标签有更实用的使用方法。比如:加入邮件默认标题,抄送地址,暗送(密件抄送)地址,邮件内容….
下面说一下详细的使用方法:
1. 为邮件加入默认标题
<a href="mailto:example@phplamp.com?subject=邮件的默认标题">example@phplamp.com</a>
2. 为邮件加入默认的抄送地址
<a href="mailto:example@phplamp.com?cc=example2@phplamp.com">example@phplamp.com</a>
3. 为邮件加入默认暗送(密件抄送)地址
<a href="mailto:example@phplamp.com?bcc=example2@phplamp.com">example@phplamp.com</a>
4. 为邮件加入默认的内容
<a href="mailto:example@phplamp.com?body=欢迎您来到phplamp博客站-http://www.phplamp.org">example@phplamp.com</a>
5. 多个邮件地址
<a href="mailto:example@phplamp.com,example2@phplamp.com">example@phplamp.com</a>
6. 来个综合型的:加入默认抄送地址,标题,内容
<a href="mailto:example@phplamp.com?cc=example2@phplamp.com&subject=phplamp博客站&body=欢迎您来到phplamp博客站-http://www.phplamp.org">example@phplamp.com</a>
由上例可以看出,假如有多个默认值需要添加的话,与邮件地址相连接的字符为"?",默认值间相连接的符号为"&"。
参考文档:Html Mailto标签详细使用方法
相关文章推荐
- Html Mailto标签详细使用方法
- Html Mailto标签详细使用方法
- html a标签-超链接中confirm方法使用介绍
- HTML <fieldset> 标签使用方法
- html中frameset的详细使用方法
- HBuilder 详细使用方法 -------------参考 :http://www.runoob.com/w3cnote/hbuilder-intro.html
- HTML embed标签使用方法和属性详解
- 使用html <a href=""/>标签连接action的方法
- 使用html <a href=""/>标签连接action的方法
- Python使用正则表达式过滤或替换HTML标签的方法详解
- thinkPHP的Html模板标签使用方法
- js中join函数的使用方法(js输出html标签)
- html中frameset的详细使用方法
- HTML embed标签使用方法和属性详解
- (HTML控件篇)fieldset和legend标签的属性和使用方法
- html的<meta>标签使用方法,一个name属性,一个content属性,其实就是一个键值对,有键有值
- html中frameset的详细使用方法
- html中frameset的详细使用方法
- html各个标签属性及使用方法资料(VIP)
- HTML中让图片滚动的<marquee>标签的使用方法