我怎样才能检测是否IE8在兼容性视图运行? [英] How can I detect if IE8 is running in compatibility view?

查看:138
本文介绍了我怎样才能检测是否IE8在兼容性视图运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

反正是有,以确定是否IE8浏览器兼容性视图打开?

Is there anyway to determine if an IE8 browser has compatibility view switched on?

我似乎无法找到在谷歌什么,所以我不知道如果这是一条信息可用...

I can't seem to find anything on Google, and so I'm wondering if this is a piece of information that is available...

你问为什么!?我试图追查在我们的应用程序中的错误。我拼凑通过ELMAH日志,似乎有一种趋势;这个错误通常是由IE8抛出。我试图回购缺陷在我的IE8的副本,但不能。我想缩小罪魁祸首,并认为这可能是一个办法做到这一点。

Why you ask!? I'm trying to track down a bug in our application. I'm piecing through the Elmah logs and there seems to be a trend; this error is generally thrown by IE8. I tried to repo the defect in my copy of IE8, but couldn't. I want to narrow down the culprits, and thought this might be a way to do it.

推荐答案

在Javascript中,使用document.documentMode

In Javascript, use document.documentMode

请参阅http://msdn.microsoft.com/en-us/library/cc196988%28VS.85%29.aspx了解详情。

这篇关于我怎样才能检测是否IE8在兼容性视图运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆