的 href URL-6ren"> 的 href URL-我需要在点击 anchor 标记时显示叠加层。如果从覆盖选项中选择肯定的 YES 响应,则默认 标记行为应遵循 href根据需要在新窗口/当前窗口打开链接。 我的 jquery 在点击标签时显示叠加层-6ren">
gpt4 book ai didi

javascript - 单击 标记时,如果选择"is"作为选项,则显示叠加层并遵循 的 href URL

转载 作者:行者123 更新时间:2023-11-30 05:43:15 26 4
gpt4 key购买 nike

我需要在点击 anchor 标记时显示叠加层。如果从覆盖选项中选择肯定的 YES 响应,则默认 <a>标记行为应遵循 href根据需要在新窗口/当前窗口打开链接。

我的 jquery 在点击标签时显示叠加层:

$('a.external-link').click(function() {

var popupid = "popuprel";

$('#' + popupid).fadeIn();

$('body').append('<div id="fade"></div>');
$('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn();

var popuptopmargin = ($('#' + popupid).height() + 10) / 2;
var popupleftmargin = ($('#' + popupid).width() + 10) / 2;

$('#' + popupid).css({
'margin-top' : -popuptopmargin,
'margin-left' : -popupleftmargin
});

return false;
});

是选项点击函数调用:

$('.link-continue').click(function() {                          
$('#fade , #popuprel').fadeOut()
});

<a class = "link-continue">YES</a>

目前,在单击"is"按钮时,叠加层将关闭,但我应该如何将其重定向到作为我单击的链接的一部分存在的 URL(单击的标签的“href”属性)。

最佳答案

关于javascript - 单击 <a> 标记时,如果选择"is"作为选项,则显示叠加层并遵循 <a> 的 href URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19549003/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com