简体   繁体   中英

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. 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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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