且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何关闭父窗口中的弹出窗口?

更新时间:2023-02-20 14:51:49

您的父页面上可能有类似的内容:

You probably have something like this on your parent page:

window.open(...);

如果将其更改为:

var popup = window.open(...);

然后您随时可以通过编码将其关闭:

then at any time you can close it by coding:

popup.close();

http://jsfiddle.net/pimvdb/bjkNx/1/