点开的窗口隐藏了新打开的窗口的一半



我试图在点击事件后打开一个新窗口,但遇到了问题。打开的窗口的一半隐藏在桌面的最右侧,我不得不拖动它才能看到它。

这是我的代码:

 if ($j==0){echo "<a   onclick="window.open(this.href,'','resizable=yes,location=no,scrollbars=yes,dependent=yes,width=1000,height=900,status'); return false" href='display_offer_GP.php?CodeOfferReflet=$row[7]&CodeOfferArtemis=$row[8]'><img id='m_$i'BORDER=0 src="images/loupe.gif" ></a>&nbsp;
" ;

有什么想法吗?谢谢

编辑:我不想为此找到解决方案,因为我知道该怎么做,我想知道为什么会发生这种情况?

尝试以下内容:

function openPopup(url)
{
    var x = screen.width/2 - 700/2;
    var y = screen.height/2 - 450/2;
    window.open(url, 'Test','height=485,width=700,left='+x+',top='+y);
}

最新更新