반응형

<html> 

<head> 

<title></title> 

<script language="JavaScript"> 

<!--Browser Type Check out-->


var ver = navigator.appVersion; 

if (ver.indexOf("MSIE") != -1) 

     

       location.href="#" 

    alert("Explore : "+ver);

       else 

       confirm("sorry : "+ver) ;

}            


</SCRIPT> 

<body> 

</body> 

</html>


출처 : 규이의블로그



---  브라우저종류

Microsoft Internet Explorer : IE

Netscape : 크롬, 파이어 폭스, 사파리

Opera : 오페라


브라우저 상세 내용자세내용

--- 크롬


-- 파이어 폭스


-- 사파리



-- 인터넷 익스플로러



-- 오페라



----------------------------------------------------
<html> 
<head> 
<meta charset="utf-8">
<title></title> 
<script type="text/JavaScript"> 
<!--Browser Type Check out-->
var Agent = {
   ua: function(){ return navigator.userAgent.toLowerCase(); },
   isIE: function(){ return this.ua().indexOf("msie") > -1; },
   isIE6: function(){ return this.ua().indexOf("msie 6") > -1; },
   isIE7: function(){ return this.ua().indexOf("msie 7") > -1; },
   isIE8: function(){ return this.ua().indexOf("msie 8") > -1; },
   isFF: function(){ return this.ua().indexOf("firefox") > -1; },
   isCR: function(){ return this.ua().indexOf("chrome") > -1; },
   isSF: function(){ return this.ua().indexOf("safari") > -1; }
};

if(Agent.isIE()) alert("IE 브라우저입니다.");
if(Agent.isIE6()) alert("IE6 브라우저입니다.");
else if(Agent.isIE7()) alert("IE7 브라우저입니다.");
else if(Agent.isIE8()) alert("IE8 브라우저입니다.");
else if(Agent.isFF()) alert("Firefox 브라우저입니다.");
else if(Agent.isCR()) alert("Chrome 브라우저입니다.");
else if(Agent.isSF()) alert("Safari 브라우저입니다.");

</SCRIPT> 
<body> 
</body> 
</html>

출처 : HeLLooo


2018-03-21 수정본
엣지에대한 정보




반응형

'progarm_old > [HTML-JS]' 카테고리의 다른 글

input name값 받기  (0) 2012.10.02
confirm 클릭시 물음 확인&취소  (0) 2012.09.28
HTML  (0) 2012.08.07
EditPlus 단축키 모음  (0) 2012.08.02
배열로 된 이름값 체크확인하기  (0) 2012.07.27

+ Recent posts