zoukankan      html  css  js  c++  java
  • 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>

    由上例可以看出,假如有多个默认值需要添加的话,与邮件地址相连接的字符为"?",默认值间相连接的符号为"&"。

  • 相关阅读:
    SSR 第二篇,搭建Vue SSR程序
    SSR 第一篇,搭建简单的SSR程序
    数组的所有方法整理学习
    CustomEvent 使用
    VUE CSS module
    eslint Expected linebreaks to be 'LF' but found 'CRLF'
    利用Object.freeze() 提升性能
    vue 项目开启gzip 压缩和性能优化
    [转]Ext Grid控件的配置与方法
    ExtJS renderer(转)
  • 原文地址:https://www.cnblogs.com/shoestrong/p/5455956.html
Copyright © 2011-2022 走看看