打开弹出窗口,单击链接,在父窗口中打开,关闭弹出窗口?

打开弹出窗口,单击链接,在父窗口中打开,关闭弹出窗口?

问题描述:

我需要帮助。我想从我的页面做的是打开一个我用它的弹出窗口:

I need help please. What I want to do from my page is to open a popup for which I use this:

<a class="txt-button" onclick="javascript:void window.open('http://mypage.com/1/index.html','','width=700,height=500,resizable=false,left=0,top=0');return false;">Buy Now</a>

当点击弹出窗口上的链接时,我希望它在主窗口中打开并弹出窗口关闭。

When a link on the popup is clicked I want it to open in the main window and for the popup to close.

我尝试了很多东西而无法让它起作用: - (

I've tried many things and cant get it to work:-(

我认为你可以使用 window.opener

window.opener.location.href=x