如何在IE兼容模式下打开本地HTML文档?

发布于 2024-11-03 12:37:15 字数 327 浏览 0 评论 0原文

我创建了一个快速而肮脏的 HTML 文件来演示我在 IE 兼容模式下遇到的问题。当我从桌面上用 IE8 打开它时,它以标准模式打开。我需要能够将其切换到兼容模式,但是当我查看本地 HTML 文档时,该图标会消失。这是怎么回事?

更新:三个提议的解决方案都没有导致 IE8 中显示兼容模式图标。相反,我将代码放入 .aspx 页面并通过 Visual Studio 执行。由于它源自本地主机,浏览器认为它是一个远程文档,并像我想要的那样显示兼容性图标。

然而,如果任何人都可以让这个工作而不必这样做,我仍然愿意接受想法,因为启动网络应用程序对我来说并不是真正的理想解决方案。

I created a quick and dirty HTML file to demonstrate an issue I am encountering in IE compatibility mode. When I open it in IE8 from my desktop, it opens in standard mode. I need to be able to switch it to compatibility mode, but the icon for that disappears when I am viewing a local HTML document. What's up with that?

UPDATE: None of the three proposed solutions has resulted in the compatibility mode icon showing in IE8. Instead, I have put my code into an .aspx page and executed it through Visual Studio. Since it's originating from localhost, the browser thinks it is a remote document and is displaying the compatibility icon like I wanted.

However, if anyone can get this to work without having to do that, I am still open to ideas since launching a web app isn't really the ideal solution for me.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

断念 2024-11-10 12:37:15

我不确定这是否有效,因为 IE 的许多 关于本地文件和兼容模式的疯狂例外和规则,但请尝试META 标记方法

例如,在您的 中说:

 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >

请参阅 了解兼容性模式,以确保您选择正确的模式。

I'm not sure whether this'll work because of IE's many crazy exceptions and rules regarding local files and compatibility mode, but try the META tag approach.

In your <head>, for example say:

 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >

See understanding compatibility modes to make sure you pick the right one.

傲鸠 2024-11-10 12:37:15

您可以尝试按 F12 打开开发人员工具栏,然后在其中进行更改。

更新:您是否尝试过工具>兼容性视图设置>在兼容性视图中显示所有网站?

You could try pressing F12 to open the developer toolbar, and change it in there.

Update: Have you tried tools > compatibility view settings > display all websites in compatibility view?

天邊彩虹 2024-11-10 12:37:15

用户可以覆盖“本地
通过取消选中Intranet'设置
'显示 Intranet 站点
工具 -> 兼容性视图
兼容性视图设置。

http://blogs .msdn.com/b/ie/archive/2009/06/17/compatibility-view-and-smart-defaults.aspx

Users can override the ‘local
intranet’ setting by un-checking
‘Display intranet sites in
Compatibility View’ at Tools ->
Compatibility View Settings.

http://blogs.msdn.com/b/ie/archive/2009/06/17/compatibility-view-and-smart-defaults.aspx

划一舟意中人 2024-11-10 12:37:15

所提出的三种解决方案均未导致 IE8 中显示兼容模式图标。相反,我将代码放入 .aspx 页面并通过 Visual Studio 执行。由于它源自本地主机,浏览器认为它是一个远程文档,并像我想要的那样显示兼容性图标。

然而,如果任何人都可以让这个工作而不必这样做,我仍然愿意接受想法,因为启动网络应用程序对我来说并不是真正的理想解决方案。

None of the three proposed solutions has resulted in the compatibility mode icon showing in IE8. Instead, I have put my code into an .aspx page and executed it through Visual Studio. Since it's originating from localhost, the browser thinks it is a remote document and is displaying the compatibility icon like I wanted.

However, if anyone can get this to work without having to do that, I am still open to ideas since launching a web app isn't really the ideal solution for me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文