加入收藏 | 设为首页 | 会员中心 | 我要投稿 衡阳站长网 (https://www.0734zz.cn/)- 数据集成、设备管理、备份、数据加密、智能搜索!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

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

发布时间:2020-12-31 05:16:03 所属栏目:资源 来源:网络整理
导读:参见英文答案 IF IE conditionals not working5个 我正在使用IE 11版本. 有没有其他解决方案来执行以下操作: 当我尝试在html webapge中使用条件IE子句时没有任何反应. 任何人都可以帮我调试这个问题. !--[if IE] a href="next-page.php" class="start-butto

参见英文答案 > 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作为替代.

(编辑:衡阳站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读