IE Conditional operator: OR … if is greater than i

2019-01-25 06:22发布

I want to only include history and ajaxify if the browser is ie9 or greater, OR is not 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:

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

Thanks!

2条回答
我欲成王,谁敢阻挡
2楼-- · 2019-01-25 06:34

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]-->
查看更多
狗以群分
3楼-- · 2019-01-25 06:35

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

查看更多
登录 后发表回答