如何从Internet Explorer 9创建弹出窗口 [英] How To Create a Popup Window from Internet Explorer 9

查看:106
本文介绍了如何从Internet Explorer 9创建弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下内容尝试在IE 9中创建弹出窗口

I'm using the following to attempt to create a popup in IE 9

function popUp(url) {
  day = new Date();
  id = day.getTime();
  eval("page" + id + " = window.open(url,'" + id + "','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=520,left = 400,top = 200');");
  return false;
}

这在Chrome,Firefox和Safari中可以正常工作-但IE 9拒绝打开弹出窗口-而是在新标签页中打开网址.我已禁用IE9中的弹出窗口阻止程序-但上面的功能仍然在新标签页而不是弹出窗口中打开网址.

This works fine in Chrome, Firefox and Safari - but IE 9 refuses to open a popup - instead opening the url in a new tab. I've disabled the popup blocker in IE9 - but the function above still opens the url in a new tab and not in a popup.

关于如何将IE9弹出的任何建议?

Any suggestions on how to get IE9 to 'popup'?

推荐答案

当用户具有让Internet Explorer决定如何打开弹出窗口"(默认设置)时,设置resize = yes将使IE9打开一个标签页, resize = no将允许弹出窗口.这可能与我尚未测试的其他属性相同.

when the user has 'Let Internet Explorer decide how pop-ups should be open' which is the default, setting resize=yes will make IE9 open a tab and resize=no will allow the popup. this might be the same with other attributes i haven't tested.

这篇关于如何从Internet Explorer 9创建弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆