我如何知道 IE6 中是否触发了 Quirks 模式?

发布于 2024-09-27 03:32:50 字数 115 浏览 2 评论 0原文

我读到,如果 DOCTYPE 未正确设置,IE6 将进入 Quirks 模式。

我已经给出了文档 HTML 4.01 Transitional,但是我如何知道 IE6 是否触发了 Quirks 模式?

I read that if the DOCTYPE is not corectly set IE6 will enter Quirks mode.

I have given a document HTML 4.01 Transitional, but how do I know if IE6 triggers Quirks mode or not?

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

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

发布评论

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

评论(3

安稳善良 2024-10-04 03:32:50

使用以下链接创建书签:

javascript:m=(document.compatMode=='CSS+Compat')?'Standards.':'Quirks';window.alert('您处于 ' + m + ' 模式。' );

create a bookmark with the following link:

javascript:m=(document.compatMode=='CSS+Compat')?'Standards.':'Quirks';window.alert('You are in ' + m + ' mode.');

抽个烟儿 2024-10-04 03:32:50

查看 document.compatMode

<script type="text/javascript" charset="utf-8">
  if(document.compatMode == 'CSS1Compat'){
    alert("Standards mode");
  }else{
    alert("Quirks mode");
  }
</script>

Look at document.compatMode

<script type="text/javascript" charset="utf-8">
  if(document.compatMode == 'CSS1Compat'){
    alert("Standards mode");
  }else{
    alert("Quirks mode");
  }
</script>
じее 2024-10-04 03:32:50

如果您查看地址栏的末尾,会有一个小“损坏的页面”图标,显示您是否处于怪异模式或“正确”模式!

您还可以使用 JavaScript 通过查询来获取此信息...

alert(document.compatMode);

If you look at the end of the address bar, there is a little "broken page" icon that shows whether you are in quirks mode, or "proper" mode!

You can also get this using JavaScript by querying...

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