0

我被困在一个地方,我想捕获 url 并通过 HTML 打印到电子邮件正文中,但不能这样做。请求您对此提供帮助。代码如下......此代码是由我只是根据我的需要修改的设备自动生成的。

<html>
This site has been blocked. If you believe this is an error,<br>
kindly contact to Mr. ABC - +9112345678
<br>Or you may <a href="mailto:abc@gmail.com?cc=xyz@gmail.com&subject=Google Website $$Category$$&body=<script>document.write(document.URL);</script>">Send Email</a>
</html>
4

2 回答 2

2

用 JS 传递 href 值怎么样?

<a id="Mail" href="#">Send Email</a>

<script>
    (function() {
        var mail = document.getElementById("Mail");
        var url = window.location.href;
        var href = "mailto:abc@gmail.com?cc=xyz@gmail.com&subject=Google Website $$Category$$&body=" + url;
        mail.href = href;
    })();
</script>
于 2013-08-12T12:30:37.413 回答
0

为此,您可以尝试使用此代码将 url 传递给电子邮件正文。

<a href="mailto:test@test.test?body=Link goes here http%3A%2F%2Fwww.example.com%2Ffoo.php%3Fthis%3Da%26join%3Dabc%26user454
">Link text goes here</a>
于 2013-08-12T12:24:36.067 回答