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>

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

  • 相关阅读:
    JQuery之动画效果
    JS (随着鼠标的移动,旁边显示放大图)
    jQuery 事件和动画
    jQuery 概述
    CSS (层叠样式表)
    css的文章部分的基本语句
    HTML基本语法
    Web
    JavaScript预解析案例,JavaScript预解析题目
    JavaScript预解析 变量提升与函数提升
  • 原文地址:https://www.cnblogs.com/shoestrong/p/5455956.html
Copyright © 2011-2022 走看看