IE条件运算符:OR ...如果大于ie9或不是IE

时间:2021-10-15 22:25:33

I want to only include history and ajaxify if the browser is ie9 or greater, OR is not ie:

我想只包含历史记录和ajaxify,如果浏览器是ie9或更高,或者不是ie:

<!--[if gte IE 9]>
    <script type="text/javascript" src="assets/js/plugins/history.js"></script>
    <script type="text/javascript" src="assets/js/plugins/ajaxify.js"></script>
<![endif]-->

How can I use the OR operator to say this:

如何使用OR运算符来说明这一点:

<!--[if gte IE 9 | !IE ]> ??

??

Thanks!

2 个解决方案

#1


16  

This worked:

    <!--[if gte IE 9 | !IE ]><!-->
        <script type="text/javascript" src="assets/js/plugins/history.js"></script>
        <script type="text/javascript" src="assets/js/plugins/ajaxify.js"></script>
    <![endif]-->

#2


3  

Yeah, the or operator is: |. You can check this link for further information on conditional comments.

是的,或者运营商是:|。您可以查看此链接以获取有关条件注释的更多信息。

#1


16  

This worked:

    <!--[if gte IE 9 | !IE ]><!-->
        <script type="text/javascript" src="assets/js/plugins/history.js"></script>
        <script type="text/javascript" src="assets/js/plugins/ajaxify.js"></script>
    <![endif]-->

#2


3  

Yeah, the or operator is: |. You can check this link for further information on conditional comments.

是的,或者运营商是:|。您可以查看此链接以获取有关条件注释的更多信息。