我要求只需点击一下按钮即可打开Gmail或Lotus Notes电子邮件客户端。我创建了一个html参考选项卡,如果没有链接,它可以工作,但我的要求是打开一个预编写的电子邮件,其中包含少量文档和说明的链接。
以下代码,
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div class="mailBackground">
<span class="heading">
Dear user,
<br/>
</span>
<span id="authoriserName" class="body">
<p> Please use below steps to open google url:</p>
</span>
<form>
<a href="mailto:example@google.com?subject=Test+Subject&cc=example@google.com&body=Hi%20%3Cuser%3E%2C%0D%0A%3Cp%3EThank%20you%3C%2Fp%3E%0D%0A%3Cp%3EWhat%20does%20that%20mean%3F%20%3C%2Fp%3E%0D%0A%3Cp%3EClick%20on%20Google%20Drive%20link%20%3Ca%20href%3D%22https%3A%2F%2Fgoogle.com%2F%22%3EGoogle%3C%2Fa%3E%20%3C%2Fp%3E%0D%0A%3C%2Fp%3E%3Cb%3EWhat%20you%20need%20to%20do%3C%2Fb%3E%3C%2Fp%3E%0D%0A%3Cul%20type%3D%22disc%22%3E%0D%0A%3Cli%3ELine%201%20%3C%2Fli%3E%0D%0A%3C%2Ful%3E%0D%0ARegards%2C%3Cbr%3E%0D%0AJack"
onclick="javascript:window.location.href='mailto:example@google.com?subject=Test+Subject&cc=example@google.com&body=Hi%20%3Cuser%3E%2C%0D%0A%3Cp%3EThank%20you%3C%2Fp%3E%0D%0A%3Cp%3EWhat%20does%20that%20mean%3F%20%3C%2Fp%3E%0D%0A%3Cp%3EClick%20on%20Google%20Drive%20link%20%3Ca%20href%3D%22https%3A%2F%2Fgoogle.com%2F%22%3EGoogle%3C%2Fa%3E%20%3C%2Fp%3E%0D%0A%3C%2Fp%3E%3Cb%3EWhat%20you%20need%20to%20do%3C%2Fb%3E%3C%2Fp%3E%0D%0A%3Cul%20type%3D%22disc%22%3E%0D%0A%3Cli%3ELine%201%20%3C%2Fli%3E%0D%0A%3C%2Ful%3E%0D%0ARegards%2C%3Cbr%3E%0D%0AJack'; return false;"
class="Button" type="button" value="Button">Button</a>
</form>
<span class="labelColor body">
<br/>Regards,
<br/>Jack
</span>
<br/>
</div>
</body>
</html>
当我点击按钮时,输出如下所示。
Hi <user>,
<p>Thank you</p>
<p>What does that mean? </p>
<p>Click on Google Drive link <a href="https://google.com/">Google</a> </p>
</p><b>What you need to do</b></p>
<ul type="disc">
<li>Line 1 </li>
</ul>
Regards,<br>
Jack
请告诉我如何将其设置为正确的格式,以便当用户点击链接时,预先组合的电子邮件应该添加链接,而不会看起来像云。
此致 纳雷什