简体   繁体   English

显示弹出窗口并重定向到链接

[英]Show popup and redirect to the link

I have been looking in too many links but I am not getting the desired results, although it is a very basic question to ask but i am unable to find some useful help. 我一直在寻找太多的链接,但是我没有得到期望的结果,尽管这是一个非常基本的问题,但是我无法找到有用的帮助。 I have a hyperlink pointing to the external link like <a href="google.com" target="_blank">google</a> , Now I want to show a popup when somone clicks on this link, I can fire up a jquery modal or fancybox on onclick event, thats not the problem. 我有一个指向外部链接的hyperlink链接,例如<a href="google.com" target="_blank">google</a> ,现在我想在有人点击此链接时显示一个弹出窗口,我可以启动一个jquery modalfancyboxonclick事件,那不是问题。 I assume that it is not possible to show my own window on external link? 我认为无法在外部链接上显示我自己的窗口? I need to fire up a modal and after closing of modal, the external link should be opened in new tab.Thanks for help. 我需要启动一个模态,并且在关闭模态后,应该在新选项卡中打开外部链接。谢谢帮忙。 I don't know what code to share here as i have only hyperlink 我不知道在这里共享什么代码,因为我只有hyperlink

If I am getting you right, solution 如果我说对了,解决方案

in your home page add the link to the popup window 在您的主页中,将链接添加到弹出窗口

<a href="#" onclick="window.open('new.html');">Open</a>

in the popup window add the following link 在弹出窗口中添加以下链接

<a href='http://google.com' onclick='window.close();' target='_blank'>LINK</a>

if it is not what you want, I hope it is a starting point to the solution 如果不是您想要的,我希望这是解决方案的起点

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM