IE条件运算符:或...如果大于ie9或不是IE [英] IE Conditional operator: OR ... if is greater than ie9 or not IE

查看:408
本文介绍了IE条件运算符:或...如果大于ie9或不是IE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

如何使用OR运算符来表示这一点:



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



谢谢!

解决方案

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


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!

解决方案

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]-->

这篇关于IE条件运算符:或...如果大于ie9或不是IE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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