Check the browser type by using the navigator.appName : appName « Navigator « JavaScript Tutorial






<html>
<head>
<script language="JavaScript" type = "text/javascript">
<!--
if (navigator.appName == "Microsoft Internet Explorer")
{
 alert("Your browser is Microsoft Internet Explorer.");
}
else if (navigator.appName == "Netscape")
{
 alert("Your browser is Netscape Navigator.");
}
else
{
 alert("You are not using Netscape Navigator or Internet Explorer.");
}
//-->
</script>
<title>Find Browser Name</title>
</head>
<body>
</body>
</html>








17.2.appName
17.2.1.navigator.appName
17.2.2.Check the browser type by using the navigator.appName