window.open 在 IE 中抛出无效参数错误

window.open is throwing invalid argument error in IE

本文关键字:无效 参数 错误 open IE window      更新时间:2023-09-26

我有IE版本11.0.9600.17358

window.open('editProperties.php?fileid=661BEAB9735A615D65B3FCF676A2F83F', 'editProperties', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=570,height=580,left=490,top=362');

抛出无效参数错误。我尝试创建一个测试.html并仅按名称调用它:

window.open('test.html')

它不起作用,抛出相同的错误。我唯一能够使用它的时间是:

window.open('', 'editProperties','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=570,height=580,left=490,top=362')

window.open('about:blank')

一旦我将 url 作为第一个参数传递,它就会引发错误。有人有什么想法吗?

只需传递 name 参数,例如:

window.open('/somefile.html', '', 'width=300');

也许在这个StackOverflow答案中,你会发现更多细节。

,哇,我打开了另一个选项卡,它再次询问我的凭据,输入后,相同的确切链接刚刚起作用。似乎是会话超时或其他什么,但仍然在加载之间向我显示了页面。如果有人遇到此错误并且上面的评论都不起作用,请尝试打开一个新选项卡!!谢谢大家尝试解决我的问题。