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();
}