Knowledge Map

브라우저 감지 본문

WEB

브라우저 감지

2016. 4. 19. 18:28

http://blog.aliencube.org/ko/2013/07/28/html5-boilerplate-and-more-for-seamless-cross-browsing/



http://skylove1982.tistory.com/181



http://ooz.co.kr/67



<script type="text/javascript">

/* 
 * 원본 : http://stackoverflow.com/questions/19999388/jquery-check-if-user-is-using-ie 
 * 수정본 : http://tonks.tistory.com/107 
 */ 


function get_version_of_IE () { 

	 var word; 
	 var version = "N/A"; 

	 var agent = navigator.userAgent.toLowerCase(); 
	 var name = navigator.appName; 

	 // IE old version ( IE 10 or Lower ) 
	 if ( name == "Microsoft Internet Explorer" ) word = "msie "; 

	 else { 
		 // IE 11 
		 if ( agent.search("trident") > -1 ) word = "trident/.*rv:"; 

		 // Microsoft Edge  
		 else if ( agent.search("edge/") > -1 ) word = "edge/"; 
	 } 

	 var reg = new RegExp( word + "([0-9]{1,})(\\.{0,}[0-9]{0,1})" ); 

	 if (  reg.exec( agent ) != null  ) version = RegExp.$1 + RegExp.$2; 

	 return version; 
} 

</script>


'WEB' 카테고리의 다른 글

ie8 에서의 중앙 정렬  (0) 2016.06.30
RESTful  (0) 2016.06.20
netstat  (0) 2016.03.25
커서  (0) 2016.03.22
AngularJS ng-repeat & ng-if  (0) 2016.03.16
Comments