问题
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!
回答1:
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:
Yeah, the or operator is: |
. You can check this link for further information on conditional comments.
来源:https://stackoverflow.com/questions/16461970/ie-conditional-operator-or-if-is-greater-than-ie9-or-not-ie