html – 如果条件语句不能与IE 11一起使用

参见英文答案 > IF IE conditionals not working5个
我正在使用IE 11版本.
有没有其他解决方案来执行以下操作:

当我尝试在html webapge中使用条件IE子句时没有任何反应.
任何人都可以帮我调试这个问题.

<!--[if IE]>
      <a href="next-page.PHP" class="start-button">CLICK ME</a>
      <![endif]-->

解决方法

Conditional statements do not work in IE 10 or 11

Support for conditional comments has been removed in Internet Explorer 10 standards and quirks modes for improved interoperability and compliance with HTML5. This means that Conditional Comments are Now treated as regular comments,just like in other browsers. This change can impact pages written exclusively for Windows Internet Explorer or pages that use browser sniffing to alter their behavior in Internet Explorer.

如果你真的需要在这些浏览器上执行代码,而你可能不应该这样做,你可以使用JavaScript来做一些feature detection作为替代.

相关文章

vue阻止冒泡事件 阻止点击事件的执行 &lt;div @click=&a...
尝试过使用网友说的API接口获取 找到的都是失效了 暂时就使用...
后台我拿的数据是这样的格式: [ {id:1 , parentId: 0, name:...
JAVA下载文件防重复点击,防止多次下载请求,Cookie方式快速简...
Mip是什么意思以及作用有哪些