窗口点打开时隐藏了一半新打开的窗口
问题描述:
我试图在点击事件后打开一个新窗口,但我遇到问题。一半打开的窗口隐藏在桌面的最右侧,我不得不拖动它以便看到它。窗口点打开时隐藏了一半新打开的窗口
这是我的代码:
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>
" ;
上为什么发生这种情况有什么想法?谢谢
编辑:我不要找到解决方案,因为我知道该怎么做,我想要的是了解为什么会发生这种情况?
答
尝试类似如下:
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);
}