Close popups at logout
I'm trying to get all popups to close when a logout is done. Logout is a servlet. There are many different popups that ar开发者_开发知识库e opened in this application. Is there any way to do this? I think I need to write a program that stores a handle of the popup window. Does this seem reasonable?
You need to store the windowObjectReference
that window.open
returns and use window.close
:
var foo = window.open(…);
foo.close();
This method is only allowed to be called for windows that were opened by a script using the window.open method.
精彩评论