在更改它的location.href之后,我基本上失去了对窗口的引用,任何帮助都非常感激。
var win = window.open(window.location,"foo","");
//win is referenced - all good
win.location.href = 'http://www.stackoverflow.com'
//url of window is successfully changed
//but I now no-longer have reference to this window
答案 0 :(得分:2)
一旦页面的位置发生变化,当前页面的所有执行都将结束。