IE7和状态栏
有没有办法通过 IE7 中的 javascript 生成一个隐藏状态栏的新窗口?
我已将 Intranet 应用程序添加为受信任站点。 不知道我还能用什么来尝试。 这是我的JS
window.open("http:/localhost/start.html", "MyApp", "left=0, top=0, width=" + screen.width + "," +
"height=" + screen.height + ", scrollbars=yes, " +
"resizable=yes, location=no, menubar=no, titlebar=no, " + "toolbar=no, status=no");
Is there a way to spawn a new window via javascript in IE7 that hides the statusbar?
I've added the intranet app as a trusted site. Not sure what else I can use to try. This is my JS
window.open("http:/localhost/start.html", "MyApp", "left=0, top=0, width=" + screen.width + "," +
"height=" + screen.height + ", scrollbars=yes, " +
"resizable=yes, location=no, menubar=no, titlebar=no, " + "toolbar=no, status=no");
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不。 Microsoft 决定“以安全的名义” (IE 博客链接)他们会强制状态栏显示在 IE7 的弹出窗口上。 (他们还强制将新的最小宽度设置为 ~250px,而不是以前的 100px - 这样他们就可以在只读下拉位置栏中显示 url)
抱歉。
No. Microsoft decided that "in the name of security" (IE Blog Link) they would force the status bar to show on popup windows in IE7. (they also force a new minimum width of ~250px instead of the 100px it used to be - this is so they can show the url in the readonly dropdown location bar thing)
Sorry.
你的代码对我有用,这是一个屏幕截图。
IE7 如何呈现没有状态栏的弹出窗口的示例。 http://img511.imageshack.us/img511/7757/workshq7.th.png
请注意,实验是在本地文件系统上完成的,“保护模式”完全关闭。 如果它对您不起作用,我的猜测是您的安全设置在某种程度上仍然太高。 出于安全原因,通过 JavaScript 修改浏览器 UI 通常会被阻止,因此不应依赖。
Your code worked for me, and here's a screenshot.
Example of how IE7 renders popup without status bar. http://img511.imageshack.us/img511/7757/workshq7.th.png
Note that experment was done on local filesystem, with "Protected Mode" completly turned off. If it didn't work for you, my guess is that your security settings is somehow still to high. Tinkering with the browser UI trough JavaScript is usually blocked for security reasons and should not be relied on.