如何在'mailto'正文链接写入当前页面 [英] How to write in 'mailto' body link to current page

查看:186
本文介绍了如何在'mailto'正文链接写入当前页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我网站的所有页面中都有 mailto 按钮,我想在电子邮件正文中写入对该页面的引用。

I have mailto button in all pages of my site and I want to write reference to that page in e-mail body.

在一页中,我可以有

In one page I can have

<a class="email" title="Email a friend" href="mailto:?subject=Interesting%20information&amp;body=I thought you might find this information interesting:%20%0d%0ahttp://www.a.com/Home/SiteMap/tabid/589/Default.aspx">Email</a>

但是,我怎样才能使这个通用的所有页面?

But how can I make this generic for all pages?



解决方案
This is the pure javascript solution:

=emailtitle =通过电子邮件发送给朋友href =#onclick =javascript:window.location ='mailto:?subject =有趣的信息& body =我想你可能会发现这个信息很有趣:'+ window.location ;>电子邮件与LT; / A>

<a class="email" title="Email a friend" href="#" onclick="javascript:window.location='mailto:?subject=Interesting information&body=I thought you might find this information interesting: ' + window.location;">Email</a>

这篇关于如何在'mailto'正文链接写入当前页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆