2011-09-15 148 views
0

我知道这个问题已经被问过太多次了,我尝试了各种选项,但我仍然无法使它工作。它在Chrome,Firefox,ie6,ie7上运行得非常好,但在ie8和ie9中以某种方式在同一窗口中打开。我附上我的代码如下供参考Popup在同一个窗口中打开,而不是新的弹出窗口

function login(url){ 
    var width = 550; 
    var height = 300; 
    console.log(screen.width); 
    console.log(screen.height); 
    var left = (screen.width/2)-(width/2); 
    var top = (screen.height/2)-(height/2); 
    fconnect = window.open(url, "SignIn", "width=550, height=300, toolbar=0,\ 
           scrollbars=0, status=0, resizable=0, \ 
           top=" + top); 

    fconnect.focus(); 
} 

回答

1

我对window.open的复杂性专家,但窗口的开启特性将部分取决于用户设置以及是否弹出窗口拦截器的安装位置。

如果需要模态对话框,this question中的示例可能会有帮助。

+0

不知何故,我得到它今天工作即ie。无论如何感谢您的回复。我不确定这个改变是否做到了。 –

+1

与我们分享工作代码! –

相关问题