IE与非IE切换使用方法:

1、IE与非IE

<!--[if !IE]> -->
        <script src="${pageContext.request.contextPath}/static/ace_admin/assets/js/jquery-2.1.4.min.js"></script>
<!-- <![endif]-->
        
<!--  [if IE] -->
       <script src="${pageContext.request.contextPath }/static/js/jquery-1.7.2.js"></script>
       <script src="${pageContext.request.contextPath }/static/js/jquery.dataTables.js"></script>
<!--   ![endif] -->

2、只有IE6版本可见 

<!--[if IE 6]> 
<![endif]-->

3、IE6及其以下版本可见 

<!--[if lte IE 6]> 
<![endif]--> 

4、IE6及其以上版本可见 

<!--[if gte IE 6]> 
<![endif]--> 

5、只有IE7版本可见 

<!--[if IE 7]> 
<![endif]-->

6、IE7及其以下版本可见 

<!--[if lte IE 7]> 
<![endif]--> 

7、IE7及其以上版本可见 

<!--[if gte IE 7]> 
<![endif]--> 

8、只有IE8版本可见 

<!--[if IE 8]> 
<![endif]-->

9、IE8及其以下版本可见 

<!--[if lte IE 8]> 
<![endif]--> 

10、IE8及其以上版本可见 

<!--[if gte IE 8]> 
<![endif]--> 

 

11、除了IE以外的版本 

<![if !IE]> 
<![endif]> 
或者:
<!--[if !IE]> --> 

<!-- <![endif]-->

 12、ie判断

if(navigator.appName == "Microsoft Internet Explorer"&&parseInt(navigator.appVersion.split(";")[1].replace(/[ ]/g, "").replace("MSIE",""))<=9){
  console.log('ie9以下,包括ie9')
}

 

posted @ 2017-07-06 10:54  淡紫色鍀薰衣草  阅读(217)  评论(0编辑  收藏  举报