2012-06-05

Check whether browser is IE or not

Use the following javasript for that. Here is an example code

<html>
<head>

<script>

function DetectBrowser()
{
  var val = navigator.userAgent.toLowerCase();
  if(val.indexOf("msie") > -1)
  {
   alert("Good! You are using IE!");
  }
  else
  {
   alert("Please use IE");
  }
}

</script>

</head>
<body onload="DetectBrowser()">
</body>
</html>

No comments: