<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>
2018-03-21 수정본
엣지에대한 정보