There are already many similarArticleBut it generally only solves the problem at the time. Now, IE8 does not seem to work in the way of exiting the tab.
After testing, the following functions are used:
Function full_win (){
VaR Height = Window. Screen. availheight-33;
VaR width = Window. Screen. availwidth-10;
Window. Opener = NULL;
Window. Open ("B. aspx", "_ blank", "Height =" + height + ", width =" + width +
", Top = 0, Left = 0, toolbar = No, menubar = No, scrollbars = Yes, resizable = Yes, location = No, status = No ");
Window. Open ('', '_ Self ');
Window. Close ();
}
The result is that when the above method is called on the. ASPX page, B. aspx is automatically enabled in full screen in the new window, and A. aspx is automatically disabled without any prompts.
The key is to call window immediately after opening a new window. open ('', '_ Self'); Because IE7 and IE8 are not allowed to open windows. open window, so use window. open open a blank page in this window, and then close it.
Supplement:
After testing, directly calling the full_win function is sometimes blocked by the pop-up window of the browser.ProgramBlock;
By default, the browser will block automatically pop-up windows. Therefore, you can add an implicit link to the page and call the click method of the link to simulate user clicking.
<A id = "alogin" href = "#" onclick = "full_win ();"> & nbsp; </a>
Call
<Script language = "JavaScript"> full_win (); </SCRIPT>