Method 1:
top.window.opener=null;
top.window.open("","_self");
top.window.close();
Method 2:
top.window.opener = top;
top.window.open('', '_self','');
top.window.close();
_blank, display the target webpage in a new window
_self, display the target webpage in the current window
_parent, the current entire window position in the frame web page displays the target web page
_top, in the frame web page, the target web page is displayed in the upper window
Script House’s own function
function closeWindow() {
window.open('','_parent','') ;
window.close();
}
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn