Browser Detect in Java Script

<html>
<head>
<script type="text/javascript">
function detectBrowser()
{
var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);
if ((browser=="Netscape"||browser=="Microsoft Internet Explorer")
  && (version>=4))
  {
  alert("You are having a Recent Browser!");
  }
else
  {
  alert("It's time to upgrade your browser!");
  }
}
</script>
</head>
<body onload="detectBrowser()">
</body>
</html>

Comments

Popular Posts