How do you get window.open to work in internet explorer 7?(你如何让 window.open 在 Internet Explorer 7 中工作?)
问题描述
在过去的 3 个小时里,我一直在尝试让我的 svg 网站打开弹出窗口,但我得到的只是 Internet Explorer 中的权限被拒绝"错误.我已经尝试了所有可以在谷歌上找到的东西,但没有任何效果.我什至已经到了只调用没有参数的 window.open() 空白的地步,仍然得到一个权限被拒绝的错误.目前在 Internet Explorer 中打开弹出式窗口的公认标准是什么...有效?
I've been trying for the past 3 hours to get my svg web site to open popups, and all I ever get is "Permission Denied" errors in internet explorer. I've tried everything I could find on google, and nothing works. I've even gone to the point of just calling window.open() blank with no parameters, and still get a permission denied error. What is the currently accepted standard for opening popups in internet explorer... that works?
推荐答案
这是在 IE6 中所做的安全更改的一部分.现在您只能从用户发起的事件中调用window.open".例如,您的代码将在元素的 onclick 事件中运行."window.open" MSDN 页面 说这个:
This is part of the security changes made in IE6. Now you can only call "window.open" from within a user-initiated event. For example, your code would work inside an element's onclick event. The "window.open" MSDN page says this:
"此方法必须使用用户启动的操作,例如单击链接或跳到一个链接并按下回车键,打开一个弹出窗口.弹出窗口Internet Explorer 6 中的阻止程序功能阻止没有打开的窗口由用户发起."
"This method must use a user-initiated action, such as clicking on a link or tabbing to a link and pressing enter, to open a pop-up window. The Pop-up Blocker feature in Internet Explorer 6 blocks windows that are opened without being initiated by the user."
这篇关于你如何让 window.open 在 Internet Explorer 7 中工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:你如何让 window.open 在 Internet Explorer 7 中工作?
基础教程推荐
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01
