如何在javascript中创建链接
我想显示单击此处查看javascript中的文章如何在javascript中创建链接,javascript,jquery,Javascript,Jquery,我想显示单击此处查看javascript中的文章 $('.rrssb-buttons').rrssb({ // required: title: '{{post.title}}', url: window.location.href, // optional: description: '{{post.content.strip|safe}}', emailBody: window.location.href }); 以上是我的代码,在e
$('.rrssb-buttons').rrssb({
// required:
title: '{{post.title}}',
url: window.location.href,
// optional:
description: '{{post.content.strip|safe}}',
emailBody: window.location.href
});
以上是我的代码,在emailBody中,它当前显示了正确的url。
我希望此url位于标记中。在屏幕上单击此处查看文章。如何做到这一点?假设我正确地解释了您的问题,您希望电子邮件地址的内容显示文章的链接。比如说, 我想看看这篇文章 如果电子邮件未被视为纯文本,则应在电子邮件中正确显示HTML元素的简单连接
$('.rrssb-buttons').rrssb({
// required:
title: '{{post.title}}',
url: window.location.href,
// optional:
description: '{{post.content.strip|safe}}',
emailBody: '<a href=" + window.location.href + '">Click here</a> to see the article.'
});
$('.rrssb按钮').rrssb({
//所需:
标题:“{post.title}}”,
url:window.location.href,
//可选:
描述:“{post.content.strip | safe}}”,
emailBody:“查看文章。”
});
假设我正确解释了您的问题,您希望电子邮件地址的内容显示文章的链接。比如说,
我想看看这篇文章
如果电子邮件未被视为纯文本,则应在电子邮件中正确显示HTML元素的简单连接
$('.rrssb-buttons').rrssb({
// required:
title: '{{post.title}}',
url: window.location.href,
// optional:
description: '{{post.content.strip|safe}}',
emailBody: '<a href=" + window.location.href + '">Click here</a> to see the article.'
});
$('.rrssb按钮').rrssb({
//所需:
标题:“{post.title}}”,
url:window.location.href,
//可选:
描述:“{post.content.strip | safe}}”,
emailBody:“查看文章。”
});