[英]Issue with window.open alignment in IE
我们在另一个服务器上托管了一个页面,当用户登录到我们的应用程序时,他们可以通过单击按钮导航到该外部页面。
该页面在左下角打开,在Google chrome中没有任何问题,但是,当我们在IE中尝试打开该窗口时,该页面就像进入屏幕一样。
码:
myWindow = window.open("mysite.com",
'',
'resizable=no, scrollbars=yes, status=yes, width=' + 1500 / systemZoom +
', height=' + 500 / systemZoom +
', top=' + top +
', left=' + left);
尝试使用以下代码显示弹出窗口:
<script type="text/javascript">
function popupwindow(url, title, w, h) {
var left = (screen.width / 2) - (w / 2);
var top = (screen.height / 2) - (h / 2);
window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
}
</script>
<a href="javascript:popupwindow('https://www.google.com','google','900','500'); ">This is the link</a>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.