为什么在Internet Explorer 11中无法识别HTML中的条件注释?现在不支持吗? [英] Why are conditional comments in HTML not recognized in Internet Explorer 11? Is it not supported now?

查看:111
本文介绍了为什么在Internet Explorer 11中无法识别HTML中的条件注释?现在不支持吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在不同的浏览器上显示不同的内容。我使用的是Internet Explorer 11和Google Chrome 39.但是,在Internet Explorer和所有其他浏览器中显示Not Internet Explorer。代码有问题吗?我看到以下代码作为对同一个问题之一的回答,那为什么它现在不工作?

I want to display different content on different browsers. I used Internet Explorer 11 and Google Chrome 39. But, in Internet Explorer and all other browsers "Not Internet Explorer" is displayed. Is something wrong with the code? I saw the following code as an answer to one of the same question , then why it is not working now?

代码:

<!DOCTYPE html>
<html>
<body>

<!--[if (IE)]><p>This is Internet Explorer</p><![endif]-->

<!--[if !(IE)]><!--> Not Internet Explorer <!--<![endif]-->

</body>
</html>


推荐答案

Microsoft从版本10开始在Internet Explorer中删除了条件注释

这篇关于为什么在Internet Explorer 11中无法识别HTML中的条件注释?现在不支持吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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