For example:
On an asp.net page, use window. showModalDialog () to open the new window B. aspx.
It can be written as var ret = window. showModalDialog ("B. aspx ", '_ self', 'scrolling: no; resizable: no; status: no; dialogWidth: 550px; dialogHeight: interval PX; center: 1 ');
But in B. in aspx, if you click a linkbutton. open a new window outside the aspx window and display: javascript :__ dopostback (…) in the address bar of the new window (...);
This is terrible because showModalDialog cannot be used to open the window B. ASPX, And the html code generated by linkbutton is:
<A href = 'javascript :__ dopostback (...) ... In this way, it is opened in a new window by default. in plaintext, the target is set to '_ self', which is still opened in the window, and I am depressed ..
The code for force-opening is:
Var hypers = document. getElementsByTagName ("");
For (I = 0; I {
Hypers [ipolic.tar get = "_ self ";
}
Such code should be fine, but it is not easy to use. No matter how many times I update the cache
Finally, find related articles on the Internet and add them to the head label.<Base target = "_ self"/>
This method is indeed easy to use, and it will not happen after it is added, but how can ie6 be difficult to update the cache?
Cannot solve the problem of re-opening the web page...
Last. Suddenly I was so depressed.