简体   繁体   English

IE9(即)兼容模式正在破坏“选择”

[英]IE9 (ie) Compatibility mode is breaking “select”

This is a real head scratcher for me.这对我来说真是令人头疼。 Our site (amyadele.com/labels/holiday-and-seasonal/…), has a price drop down in the right hand sidebar.我们的网站 (amyadele.com/labels/holiday-and-seasonal/...) 在右侧边栏中有一个价格下降。 In every browser except IE, the pricing drop down works.在除 IE 之外的所有浏览器中,定价下拉菜单都有效。 When you view it in ie, the drop down does not show anything.当您在 ie 中查看它时,下拉菜单不显示任何内容。 I used i9 just recently, and if I force ie9 out of compatibility mode, the drop down works.我最近才使用 i9,如果我强制 ie9 退出兼容模式,则下拉菜单有效。

Does anybody know a solution to this, or see what might be causing this issue?有谁知道这个问题的解决方案,或者看看可能导致这个问题的原因是什么?

Force IE into standards mode by starting the document with <!DOCTYPE html> , and out of compatibility mode by adding <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> in the <head> .通过使用<!DOCTYPE html>启动文档来强制 IE 进入标准模式,并通过在<head>中添加<meta http-equiv="X-UA-Compatible" content="IE=Edge" />退出兼容模式.

Seriously, in Quirks mode a browser is basically allowed to draw a sad kitten instead of your website.说真的,在 Quirks 模式下,基本上允许浏览器画一只悲伤的小猫,而不是你的网站。

Try changing your DOCTYPE tag from尝试更改您的 DOCTYPE 标签

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

to

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Also, don't confuse Browser Mode and Document Mode.另外,不要混淆浏览器模式和文档模式。 In IE if you F12 (Developer tools) and try different combinations from the 2 menus once the page is loaded.在 IE 中,如果您按 F12(开发人员工具)并在页面加载后尝试 2 个菜单中的不同组合。 Your 'select' works fine for me with Browser Mode: 'IE9 Compat View' and Document Mode: anything other than Quirks.您的“选择”对我来说适用于浏览器模式:“IE9 兼容视图”和文档模式:除了 Quirks 之外的任何东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM