How do you get window.open to work in internet explorer 7?

前端 未结 1 434
耶瑟儿~
耶瑟儿~ 2020-12-06 19:56

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

相关标签:
1条回答
  • 2020-12-06 20:49

    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:

    "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."

    0 讨论(0)
提交回复
热议问题